Skip to content

Instantly share code, notes, and snippets.

@pierre-b
Created March 6, 2017 10:03
Show Gist options
  • Save pierre-b/8c3d2d1722f5d88533142a37ade9ecfc to your computer and use it in GitHub Desktop.
Save pierre-b/8c3d2d1722f5d88533142a37ade9ecfc to your computer and use it in GitHub Desktop.
golang fish shell config
# config file
# vim ~/.config/fish/config.fish
# reload the config
# source ~/.config/fish/config.fish
# set the workspace path
set -x GOPATH /users/my-username/go
# add the go bin path to be able to execute our programs
set -x PATH $PATH /usr/local/go/bin $GOPATH/bin
@robotamer
Copy link

robotamer commented Feb 12, 2025

Here is my setup:

### GO LANG
if test -d ~/code/go
     set --export --universal GOROOT (go env GOROOT)
     set --export --universal GOPATH (go env GOPATH)
     set --export --universal GOBIN (go env GOBIN)
     set --export --universal PATH $PATH $GOBIN $GOROOT/bin
     alias cdgo="cd $GOPATH/src"
     alias gomodOn="set -gx GO111MODULE on"
     alias gomodOff="set -gx GO111MODULE off"
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment