#!/bin/bash set -ex # fail on any error PKG=$(cat go.mod | grep module | awk '{print $2}') PKG_LIST=$(go list ${PKG}/... ) for CUR_PKG in $PKG_LIST do go test -timeout 600s -coverprofile=/tmp/go-code-cover $CUR_PKG done