Simplify go config

This commit is contained in:
Anthony Rose 2025-01-23 08:16:03 +00:00
parent eeeef744a2
commit 3b34e4eb9b

View file

@ -279,22 +279,9 @@ then
fi fi
# Set up Go. # Set up Go.
if [ -x "$ACP/opt/go/bin/go" ] || [ -x /usr/bin/go ] || [ -x /usr/local/bin/go ] if command -v go >/dev/null
then then
export GOPROXY=https://proxy.golang.org _acp_add_path "$(go env GOPATH)"
export GOPATH="$XDG_DATA_HOME/go"
if [ ! -d "$GOPATH" ]
then
mkdir -p "$GOPATH/bin"
mkdir -p "$GOPATH/pkg"
mkdir -p "$GOPATH/src"
fi
if [ -x "$ACP/opt/go/bin/go" ]
then
export GOROOT="$ACP/opt/go"
_acp_add_path "$GOROOT/bin"
fi
_acp_add_path "$GOPATH/bin"
fi fi
# Basic and extra prun (podman run) aliases. # Basic and extra prun (podman run) aliases.