You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.
The h2non/gock has already renamed it’s import path from "github.com/h2non/gock" to "gopkg.in/h2non/gock.v1".
As README of h2non/gock v1.0.12 said, downstream repos should use "gopkg.in/h2non/gock.v1" to get or import h2non/gock.
Installation
> go get -u gopkg.in/h2non/gock.v1
Examples
See examples directory for more featured use cases.
Simple mocking via tests
package test
import (
"github.com/nbio/st"
"gopkg.in/h2non/gock.v1"
"io/ioutil"
"net/http"
"testing"
)
…
@KateGo520 Thanks for telling us this and being interested in Skygear! I am sorry that Skygear is no longer in active development. Instead, we are developing Authgear. Check it out!
Background
The
h2non/gock
has already renamed it’s import path from "github.com/h2non/gock" to "gopkg.in/h2non/gock.v1".As README of
h2non/gock
v1.0.12 said, downstream repos should use "gopkg.in/h2non/gock.v1" to get or importh2non/gock
.But
SkygearIO/skygear-server
still used the old path:https://github.com/SkygearIO/skygear-server/blob/master/go.mod#L24
When you use the old path "github.com/h2non/gock" to import the
h2non/gock
, it will be very easy to reintroduceh2non/gock through the import statements "import gopkg.in/h2non/gock.v1" in the go source file of
h2non/gock`.https://github.com/h2non/gock/blob/v1.0.14/_examples/custom_matcher/matcher.go#L5
The "gopkg.in/h2non/gock.v1" and "github.com/h2non/gock" are the same repos. This will work in isolation, bring about potential risks and problems.
So, why not get rid of the old import path "github.com/h2non/gock ", use "gopkg.in/h2non/gock.v1" instead.
Solution
Replace all the old import paths, change
"github.com/h2non/gock"
to"gopkg.in/h2non/gock.v1"
.Where did you import it: https://github.com/SkygearIO/skygear-server/search?q=github.com%2Fh2non%2Fgock&unscoped_q=github.com%2Fh2non%2Fgock
The text was updated successfully, but these errors were encountered: