pact-foundation / pact-go

Golang version of Pact. Pact is a contract testing framework for HTTP APIs and non-HTTP asynchronous messaging systems.
http://pact.io
MIT License
828 stars 103 forks source link

Installation section of README.md is the wrong path #405

Closed Martih87 closed 3 weeks ago

Martih87 commented 1 month ago

Software versions

Expected behaviour

go get or go install pact-go is suppose to work with a specific version for v2.

Actual behaviour

Currently, it is unable to install a specific version in version 2.

Steps to reproduce

run the go get command on a fresh system.

Relevent log files

go: github.com/pact-foundation/pact-go/v2@2.0.4: invalid version: unknown revision 2.0.4

fix:

# install pact-go as a dev dependency
go get github.com/pact-foundation/pact-go/v2@v2.x.x
# install pact-go as a dev dependency with go install:
go install github.com/pact-foundation/pact-go/v2@v2.0.4

# NOTE: If using Go 1.19 or later, you need to run go install instead 
# go install github.com/pact-foundation/pact-go/v2@2.x.x

# download and install the required libraries. The pact-go will be installed into $GOPATH/bin, which is $HOME/go/bin by default. 
pact-go -l DEBUG install 

# 🚀 now write some tests!
mefellows commented 3 weeks ago

Thanks, I've updated it now (removed the specific version identifier as it's not needed)