https://github.com/pactflow/example-provider-golang
Example Gin Golang Provider
https://github.com/pactflow/example-provider-golang
example
Last synced: 10 months ago
JSON representation
Example Gin Golang Provider
- Host: GitHub
- URL: https://github.com/pactflow/example-provider-golang
- Owner: pactflow
- License: mit
- Created: 2021-01-11T12:48:40.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2025-04-14T19:49:59.000Z (10 months ago)
- Last Synced: 2025-04-15T06:48:09.859Z (10 months ago)
- Topics: example
- Language: Go
- Size: 1.61 MB
- Stars: 1
- Watchers: 10
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Example Provider

[](https://test.pactflow.io/overview/provider/pactflow-example-consumer-golang/consumer/pactflow-example-consumer-golang)
This is an example of a (Gin-based) Golang provider that uses Pact, [PactFlow](https://pactflow.io) and GitHub Actions to ensure that it is compatible with the expectations its consumers have of it.
The project uses a Makefile to simulate a very simple build pipeline with two stages - test and deploy.
It is using a public tenant on PactFlow, which you can access [here](https://test.pactflow.io) using the credentials `dXfltyFMgNOFZAxr8io9wJ37iUpY42M`/`O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1`. The latest version of the Example Consumer/Example Provider pact is published [here](https://test.pactflow.io/pacts/provider/pactflow-example-provider-golang/consumer/pactflow-example-consumer/latest).
## Pre-Requisites
In order to use pact-go v2, you must install pact ffi system libraries to your machine.
```
make install
```
In order to use the pact cli tools, which interact with a pact broker, the Ruby standalone binaries must be installed, the following script will download them and add them to your system PATH
```
make install_cli
```
## Usage
See the [PactFlow CI/CD Workshop](https://github.com/pactflow/ci-cd-workshop).
```
make fake_ci
```