display_error() { tput sgr0 tput setaf 1 echo "ERROR: $1" tput sgr0 return 1 } function gvm_pkgset_use() { [[ $gvm_go_name != "" ]] || display_error "No Go version selected" fuzzy_match=`ls $GVM_ROOT/environments | grep "$gvm_go_name@" | grep "$1"` || display_error "Invalid package set" . "$GVM_ROOT/environments/$gvm_go_name@$1" || display_error "Failed to source the package set environment" echo "Now using version $fuzzy_match" }