GOLANG_VER="${GOLANG_VER:-go}" # Search for 'go' at the least
# WEBI_ARCH uses only slightly different names from GOLANG_ARCH
GOLANG_VER="${GOLANG_VER:-go}" # Search for 'go' at the least
# WEBI_ARCH uses only slightly different names from GOLANG_ARCH
if [ -n "$(command -v curl 2>/dev/null | grep curl)" ]; then
curl -fSL ${GOLANG_REMOTE} -o ${GOLANG_LOCAL} || echo 'error downloading golang'
elif [ -n "$(command -v wget 2>/dev/null | grep wget)" ]; then
if [ -n "$(command -v curl 2>/dev/null | grep curl)" ]; then
curl -fSL ${GOLANG_REMOTE} -o ${GOLANG_LOCAL} || echo 'error downloading golang'
elif [ -n "$(command -v wget 2>/dev/null | grep wget)" ]; then
mkdir -p ${GOLANG_UNTAR}/
# --strip-components isn't portable, switch to portable version by performing move step after untar
tar xf ${GOLANG_LOCAL} -C ${GOLANG_UNTAR}/ #--strip-components=1
mkdir -p ${GOLANG_UNTAR}/
# --strip-components isn't portable, switch to portable version by performing move step after untar
tar xf ${GOLANG_LOCAL} -C ${GOLANG_UNTAR}/ #--strip-components=1