From c0e71c965ce9733a20a49de7bb5f2b3181ea7816 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Mon, 19 Apr 2021 01:16:01 +0100 Subject: [PATCH] feat(golang): install and manage Go versions with stefanmaric/g --- zsh/golang.zsh | 9 +++++++++ zshenv | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/zsh/golang.zsh b/zsh/golang.zsh index 3bfc693..cf4ee32 100755 --- a/zsh/golang.zsh +++ b/zsh/golang.zsh @@ -2,6 +2,15 @@ # Go (golang) environment setup. # +# ============================================================================== +# g - Simple go version manager, gluten-free +# ============================================================================== + +# Create symlink for "g" called "gv", as I have "g" aliased to "git". +zinit ice wait lucid as'program' pick'bin/g' from'gh' \ + atclone'cd bin && ln -s g gv' atpull'%atclone' +zinit light stefanmaric/g + # ============================================================================== # global golang packages # ============================================================================== diff --git a/zshenv b/zshenv index df468c4..c3766b1 100644 --- a/zshenv +++ b/zshenv @@ -149,8 +149,9 @@ path_prepend "/opt/emacs/bin" # Use custom tmux install if available path_prepend "/opt/tmux/bin" -# Go setup for golang (./zsh/golang.zsh) +# Go setup (./zsh/golang.zsh) export GOPATH="$HOME/.go" +export GOROOT="$HOME/.local/go" path_prepend "$GOPATH/bin" # Ruby setup for rbenv (./zsh/ruby.zsh)