当我将go mod添加到项目中时,无法运行它,我该如何解决?

时间:2019-10-31 15:54:48

标签: go go-modules

我编写了一个应用程序,当我将go模块添加到项目go mod init并尝试启动go run app.go时,我遇到了错误:build command-line-arguments: cannot load github.com/nicksnyder/go-i18n/i18n: module github.com/nicksnyder/go-i18n@latest (v2.0.2+incompatible) found, but does not contain package github.com/nicksnyder/go-i18n/i18n。我该怎么办?

go.mod:


require (
    github.com/BurntSushi/toml v0.3.1
    github.com/blang/semver v3.5.1+incompatible // indirect
    github.com/dyatlov/go-opengraph v0.0.0-20180429202543-816b6608b3c8 // indirect
    github.com/go-ldap/ldap v3.0.3+incompatible // indirect
    github.com/gorilla/handlers v1.4.2
    github.com/gorilla/mux v1.7.3
    github.com/gorilla/websocket v1.4.1 // indirect
    github.com/mattermost/mattermost-server v5.11.1+incompatible
    github.com/pborman/uuid v1.2.0 // indirect
    github.com/syndtr/goleveldb v1.0.0
    go.uber.org/zap v1.12.0 // indirect
    golang.org/x/crypto v0.0.0-20191029031824-8986dd9e96cf // indirect
    gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect
    gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
)

go.sum:

...
github.com/nicksnyder/go-i18n v2.0.2+incompatible 
...

0 个答案:

没有答案