#!/bin/bash set -e readonly supportedGo="go1.2[012345]" # Ensure go is installed if ! command -v go ; then echo "Error: Could not locate go binary!" exit 1 fi if [[ ! "$(go version)" =~ ${supportedGo} ]] ; then echo "Error: Unsupported version of go installed!" exit 1 fi