#!/bin/bash # go tool dist list for all valid GOOS/GOARCH targets. for tgt in $(go tool dist list); do o="$(echo ${tgt} | cut -f1 -d '/')" a="$(echo ${tgt} | cut -f2 -d '/')" out="$(env GOOS=${o} GOARCH=${a} go build ./... 2>&1)" ret=${?} if [ $ret -ne 0 ]; then echo "OS: ${o}" echo "ARCH: ${a}" echo "${out}" echo echo fi done