From 795adc940fe5bd5b158d39eebec9774d2b32769d Mon Sep 17 00:00:00 2001 From: Felix Nehrke Date: Tue, 25 Aug 2026 01:51:14 +0200 Subject: [PATCH] Add go-path to environment variables for go-programming --- .profile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.profile b/.profile index 587696e..d69618f 100644 --- a/.profile +++ b/.profile @@ -46,6 +46,16 @@ NVM_DIR="$XDG_CONFIG_HOME/nvm" SDKMAN_DIR="$XDG_CONFIG_HOME/sdkman" # rust cargo CARGO_HOME="$XDG_DATA_HOME/cargo" +# golang installations +GOPATH="$XDG_CONFIG_HOME/go" + +# adjust for go-installations +if test -d "$HOME/.local/opt/go" +then + PATH="$HOME/.local/opt/go/bin:$PATH" + export PATH="$PATH:$(go env GOPATH)/bin" +fi + # homebrew is complicated as shit, lucky me only relevant on macos test `uname` = "Darwin" && test `uname -m` = "arm64" && HOMEBREW_PREFIX=/opt/homebrew test `uname` = "Darwin" && test ! `uname -m` = "arm64" && HOMEBREW_PREFIX=/usr/local