Reduce Go import paths
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
command
docs
.codeclimate.yml
.fgo
.gitignore
.gitmodules
.travis.yml
CHANGELOG.md
LICENSE
LICENSES.md
Makefile
README.md
commands.go
main.go
version.go
wercker.yml

README.md

gii

MIT License Build Status Code Climate Release Japanese

Add not Go project repositories to .goimportsignore.

When you employ go-style directory tree^1 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.

Usage

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

Installation

$ 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.

License

This software is released under the MIT License, see LICENSE.