unset GOROOT path.append $HOME/.local/go/bin which go &> /dev/null || return path.append $HOME/go/bin function go.test { func=${1:-.*} if [[ $func == *'/'* ]]; then suite=$(echo $func | cut -d/ -f1) func=$(echo $func | cut -d/ -f2) else suite=".*" fi # syntax error bash # go test -run ^${suite}$ -testify.m ^(${func})$ -v . | ccze -A go test -run ^${suite}$ -testify.m ^\(${func}\)$ -v . | ccze -A }