dragon-imports
A tool for speedup goimports command 🐉
Usage
All you have to do run dragon-imports
command 👍
$ dragon-imports
After run the command, your goimports will become fast 💫
goimports time (sec)
How dose it work?
goimports
command searches for a package with the given symbols from stdlib mappings at first. In this case, the command hopefully never have to scan the GOPATH.
dragon-imports
add GOPATH's libs to stdlib mappings, and install goimports again.
new goimports
have stdlib and all GOPATH's libs mappings, it's very fast.
Note: It supports .goimportsignore
and ignores vendor/
directory.
Return to the original goimports
You can return to the original goimports by the following:
$ dragon-imports --restore
Installation
$ go get github.com/monochromegane/dragon-imports/...
Note:
dragon-imports supports golang.org/x/tools older than the revision.
So, I recommend upgrading golang.org/x/tools by go get -u golang.org/x/tools/...
.
ToDo
- File system notification.
Contribution
- Fork it
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Run test suite with the
go test ./...
command and confirm that it passes
- Run
gofmt -s
- Create new Pull Request
License
MIT
Author
monochromegane