go version)?$ go version go version go1.12.14 windows/amd64 and linux xenial i think it dosen't matter..
i didn't try yet
go env)?go env Output
$ go env
$ go mod init
$ go test -v
go: finding github.com/stretchr/testify/assert latest
go: finding go.mongodb.org/mongo-driver/mongo latest
go: finding go.mongodb.org/mongo-driver/bson/primitive latest
go: finding go.mongodb.org/mongo-driver/mongo/options latest
go: finding go.mongodb.org/mongo-driver/bson latest
go: finding github.com/xdg/scram latest
go: finding github.com/aws/aws-sdk-go/aws latest
go: finding github.com/aws/aws-sdk-go/aws/awserr latest
go: finding github.com/aws/aws-sdk-go/aws/session latest
go: finding github.com/aws/aws-sdk-go/aws/credentials latest
go: finding github.com/aws/aws-sdk-go/service/ses latest
go: finding github.com/aws/aws-sdk-go/service/s3 latest
go: finding github.com/aws/aws-sdk-go/service/s3/s3manager latest
go: finding github.com/google/go-cmp/cmp latest
go: finding github.com/google/go-cmp/cmp/cmpopts latest
go: finding github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus latest
go: finding github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub latest
go: finding github.com/Azure/go-autorest/autorest/azure latest
go: finding github.com/aws/aws-sdk-go v1.27.1
go: finding github.com/aws/aws-sdk-go/service latest
go: finding golang.org/x/sync/semaphore latest
go: finding golang.org/x/sync latest
go: downloading github.com/aws/aws-sdk-go v1.27.1
go: finding github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01 latest
go: finding github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01 latest
go: finding github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt latest
go: finding github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt latest
go: finding github.com/Azure/azure-sdk-for-go/services/servicebus latest
go: finding github.com/Azure/azure-sdk-for-go/services/eventhub latest
go: finding github.com/Azure/azure-sdk-for-go/services latest
go: finding github.com/Azure/azure-sdk-for-go v38.0.0+incompatible
go: downloading github.com/Azure/azure-sdk-for-go v38.0.0+incompatible
go: extracting github.com/aws/aws-sdk-go v1.27.1
go: extracting github.com/Azure/azure-sdk-for-go v38.0.0+incompatible
go: updates to go.mod needed, but contents have changed
go.sum file is little weird..
this is fine in the local environment.
but when I try to use it in travis or docker compose the build keeps failing
because I can't find a particular repository.
get "gopkg.in/yaml.v2": found meta tag get.metaImport{Prefix:"gopkg.in/yaml.v2", VCS:"git", RepoRoot:"https://gopkg.in/yaml.v2"} at https://gopkg.in/yaml.v2?go-get=1
go: finding gopkg.in/yaml.v2 v2.2.2
go: github.com/belogik/[email protected]: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /home/travis/gopath/pkg/mod/cache/vcs/5b0453a6aac74c86b31f0a771f02325d031eaf6ec0f0503f1cc20852de3abb0a: exit status 128:
remote: Repository not found.
fatal: repository 'https://{Username}:{GITHUB_TOKEN}@github.com/belogik/goes/' not found
the belogik/goes repository not found error
i didn't use this repository
but always bring me the repository by the go modules
here is my go.mod file
module github.com/{MYREPO}
go 1.12
require (
github.com/Azure/azure-sdk-for-go v38.0.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.9.3 // indirect
github.com/Azure/go-autorest/autorest/adal v0.8.1 // indirect
github.com/Azure/go-autorest/autorest/to v0.3.0 // indirect
github.com/Azure/go-autorest/autorest/validation v0.2.0 // indirect
github.com/DataDog/zstd v1.4.4 // indirect
github.com/appleboy/gin-jwt/v2 v2.6.2
github.com/aws/aws-sdk-go v1.27.1 // indirect
github.com/fortytw2/leaktest v1.3.0 // indirect
github.com/gin-contrib/cors v1.3.0
github.com/gin-gonic/gin v1.5.0
github.com/go-stack/stack v1.8.0 // indirect
github.com/google/go-cmp v0.3.1 // indirect
github.com/gorilla/websocket v1.4.1
github.com/stretchr/testify v1.4.0
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c // indirect
github.com/xdg/stringprep v1.0.0 // indirect
go.mongodb.org/mongo-driver v1.2.0
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect
gopkg.in/go-playground/validator.v9 v9.31.0
pack.ag/amqp v0.12.5
)
Is github.com/belogik/goes a private repo? If so, please see https://golang.org/doc/faq#git_https for additional information.
Also, keep in mind that the go.mod file doesn't necessarily contain all the module versions that your project depends on, usually it only contains the direct dependencies. Take a look at your go.sum file, maybe it's there. Or use go mod why github.com/belogik/goes to check the reason.
Thank you for your answering.
github.com/belogik/goes is not my repository it's just auto created by the go modules
and i get to type go mod why github.com/belogik/goes
below is the result
# github.com/belogik/goes
(main module does not need package github.com/belogik/goes)
main module does not need thie package but i can't remove that link in the go.mod file
it's just auto create
Try this: go mod graph | grep 'github.com/belogik/goes'
$ go mod graph | grep 'github.com/belogik/goes'
github.com/astaxie/[email protected] github.com/belogik/[email protected]
$ go mod why github.com/astaxie/beego
# github.com/astaxie/beego
(main module does not need package github.com/astaxie/beego)
$ go mod graph | grep 'github.com/astaxie/beego'
github.com/appleboy/gofight/[email protected] github.com/astaxie/[email protected]
github.com/astaxie/[email protected] github.com/Knetic/[email protected]+incompatible
github.com/astaxie/[email protected] github.com/beego/[email protected]
github.com/astaxie/[email protected] github.com/beego/[email protected]
github.com/astaxie/[email protected] github.com/belogik/[email protected]
github.com/astaxie/[email protected] github.com/bradfitz/[email protected]
github.com/astaxie/[email protected] github.com/casbin/[email protected]
github.com/astaxie/[email protected] github.com/cloudflare/[email protected]
github.com/astaxie/[email protected] github.com/couchbase/[email protected]
github.com/astaxie/[email protected] github.com/couchbase/[email protected]
github.com/astaxie/[email protected] github.com/couchbase/[email protected]
github.com/astaxie/[email protected] github.com/cupcake/[email protected]
github.com/astaxie/[email protected] github.com/edsrzf/[email protected]
github.com/astaxie/[email protected] github.com/elazarl/[email protected]
github.com/astaxie/[email protected] github.com/go-redis/[email protected]+incompatible
github.com/astaxie/[email protected] github.com/go-sql-driver/[email protected]
github.com/astaxie/[email protected] github.com/gogo/[email protected]
github.com/astaxie/[email protected] github.com/golang/[email protected]
github.com/astaxie/[email protected] github.com/gomodule/[email protected]+incompatible
github.com/astaxie/[email protected] github.com/lib/[email protected]
github.com/astaxie/[email protected] github.com/mattn/[email protected]
github.com/astaxie/[email protected] github.com/pelletier/[email protected]
github.com/astaxie/[email protected] github.com/pkg/[email protected]
github.com/astaxie/[email protected] github.com/siddontang/[email protected]
github.com/astaxie/[email protected] github.com/siddontang/[email protected]
github.com/astaxie/[email protected] github.com/siddontang/[email protected]
github.com/astaxie/[email protected] github.com/ssdb/[email protected]
github.com/astaxie/[email protected] github.com/syndtr/[email protected]
github.com/astaxie/[email protected] github.com/wendal/[email protected]
github.com/astaxie/[email protected] golang.org/x/[email protected]
github.com/astaxie/[email protected] golang.org/x/[email protected]
github.com/astaxie/[email protected] gopkg.in/[email protected]
Keep digging until you find the one you depend on directly: go mod graph | 'github.com/appleboy/gofight/v2'
i found it github.com/appleboy/gin-jwt/v2
i was recongnized the go.sum file changed because of the import github.com/appleboy/gin-jwt/v2 changed without v2.
but i should use this repository(v2)
because they were recommended this way link
thank you @aofei i love you
@Kyocfe @aofei Already fixed https://github.com/appleboy/gin-jwt/pull/229
thank you for your quick feedback :) i'll follow it
Most helpful comment
@Kyocfe @aofei Already fixed https://github.com/appleboy/gin-jwt/pull/229