h2non / gock

HTTP traffic mocking and testing made easy in Go ༼ʘ̚ل͜ʘ̚༽

Home Page:https://pkg.go.dev/github.com/h2non/gock

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error using gock v.1.0.13 with go modules

triodan opened this issue · comments

Overview

gock v1.0.13 appears to depend on the parth repository. Using normal go get -u gopkg.in/h2non/gock.v1 in a go modules environment results in the following error:

../../go/pkg/mod/gopkg.in/h2non/gock.v1@v1.0.13/matchers.go:123:13: undefined: parth.Sequent

This appears to be caused by the go modules version resolver which somehow imports perth v.1.1.3 as a transitive dependency, instead of the v.2.0.0.

Currently this can be fixed by pinning gock to version v.1.0.12 in the go.mod file of the project using gock.

System Information

OS version: Ubuntu 18.04
Go version: 1.11.1 linux/amd64

How to simulate

  1. Create a go project outside the $GOPATH, using go mod init
  2. Run go get -u gopkg.in/h2non/gock.v1 to add gock as a module dependency.
commented

Thanks for reporting. It should be fixed in v1.0.14.