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, e.g. s.SomeFunc().
Another solution is to run
golangci-linton your file:For me, the fix was adding a new line between the import: