How do I fix this error?
pkg/path/to/file.go:22: File is not `goimports`-ed with -local github.com/some/repositiory (goimports)
s "github.com/some/repositiory/pkg/somepkg"
If I run goimports -local pkg/path/to/file.go
the program just seems to get stuck and nothing happens.
s
is the name I use to refer to somepkg
, eg s.SomeFunc()
.
You have to run
goimports -w -local github.com/some/repositiory pkg/path/to/file.go
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.