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
This is a small bug but mostly working as intended. I'm assuming you were working outside of GOPATH. The examples directory is not a module, so goimports can't find its dependencies outside of GOPATH, and therefore can't determine that the package's name is paginate. If you run it inside of GOPATH, or make the examples directory a module with valid dependencies, goimports will work fully.
Ideally the dependency would be kept if its name is unknown but goimports is already complicated enough and people generally can compile the code they're working on. Once you run it once the import will be given an explicit name and goimports will understand it's in use.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
After i run
goimports -w
on file https://github.com/GrigoriyMikhalkin/sqlboiler-paginate/blob/master/examples/simple_net_example.go it removes valid import"github.com/grigoriymikhalkin/sqlboiler-paginate/v4"
. It's important to note that package name(paginate
) differs from module name.The text was updated successfully, but these errors were encountered: