1#!/usr/bin/env bash 2 3readarray -t mod_files < <(find . -type f -name go.mod) 4 5echo "Checking files ${mod_files[@]}" 6 7matches=$(awk '$1 == "go" {print $2}' "${mod_files[@]}" | sort -u | wc -l) 8 9if [[ "${matches}" -ne 1 ]]; then 10 echo 'Not all go.mod files have matching go versions' 11 exit 1 12fi