This plugin for Linter provides an interface to the
golint tool. It will be used
with files that have the Go
syntax.
-
Install Go for your system.
-
Install
golint
per the instructions at its repo.
$ apm install linter-golinter
You can configure linter-golinter inside the Atom settings menu or by editing
your ~/.atom/config.cson
file (choose Open Your Config in Atom menu):
"linter-golinter":
"executablePath": "golint" # Path to golint executable.
Tip:
Add your
GOPATH
binaries directory to yourPATH
. If you installedGo
to the default location, you can use this shell command to add it to your.bashrc
file:printf "\nexport PATH=\$PATH:\$HOME/go/bin\n" >> $HOME/.bashrcThis should prevent needing to set the
golint
executable path.
If the default path resolution of just golint
is not working for you, you
can try using the command which golint
on UNIX / macOS or where.exe golint
on
Windows in a terminal / command prompt to print the path to your golint
installation. In most cases it should be $GOPATH/bin/golint
.