@@ 66,9 66,10 @@ install_version() {
FILENAME=go$target.$GOOS-$GOARCH.tar.gz
DL_PATH=$LIB_DIR/../$FILENAME
mkdir -p "$LIB_DIR"
- echo "Downloading $target"
+ echo "Downloading $target ($FILENAME)"
if ! curl -s -L -o "$DL_PATH" "https://go.dev/dl/$FILENAME"; then
echo "Couldn't download Go $target. Are you sure it exists?"
+ echo "Go versions prior to 1.21 omitted trailing zero version components, but versions >= 1.21 should be fully-specified like 1.21.0"
rm "$DL_PATH"
rm -rf "$LIB_DIR"
return 1
@@ 118,8 119,6 @@ latest_version() {
highest_patch=$patch
fi
done
- if [ "$highest_minor" -eq 0 ] && [ "$highest_patch" -eq 0 ]; then echo "$highest_major"; return 0; fi
- if [ "$highest_patch" -eq 0 ]; then echo "$highest_major.$highest_minor"; return 0; fi
echo "$highest_major.$highest_minor.$highest_patch"
}