Add not Go project repositories to .goimportsignore
.
When you employ go-style directory tree1 to maintain all repositories on your
local environment, your $GOPATH/src
might have many repositories even if they
aren't written in Go, and hence goimports
becomes slower.
gii
lists up repositories which aren't Go projects from your $GOPATH/src
and writes them to .goimportsignore
so that goimports
can ignore those
repositories.
Run just gii
if environment variable $GOPATH
is defined.
If you want to use another root path, use --gopath
flag.
gii
appends paths of repositories which aren't Go projects
but haven't been added in $GOPAH/.goimportsignore
yet.
To delete paths from .goimportsignore
, edit that file manually.
Here is the help text of gii
:
gii [global options]
GLOBAL OPTIONS:
--gopath GOPATH GOPATH [$GOPATH]
--help, -h show help
--version, -v print the version
$ go get github.com/jkawamoto/gii
or if you're a Homebrew user,
$ brew tap jkawamoto/gii
$ brew install gii
Compiled binaries are also available in Github.
This software is released under the MIT License, see LICENSE.