forked from robfig/goimports
Tool to fix (add, remove) your Go imports automatically.
License
jmptrader/goimports
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This tool updates your Go imports, adding missing ones and removing unreferenced onces. It's a fork of gofmt, and will also fmt your code, so it can be used as a replacement for your gofmt-on-save hook in your editor. Caveats: For adding, it currently only knows about the standard library. There is not yet support for searching/indexing GOPATH or calling out to a helper program to look up from "foo.Bar" to the necessary import. For removal, it assumes the import path base matches the package name, which is best practice anyway, like: import "github.com/you/foo" // assumes to import package "foo" If they don't match, explictly name the package name in your import line: import foo "github.com/you/not-quite-foo" These caveats might be fixed.
About
Tool to fix (add, remove) your Go imports automatically.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Go 100.0%