#!/usr/bin/env bash

set -e

cd "$(dirname "$0")/.."

echo "==> Checking go.mod is tidy"
go mod tidy -diff

echo "==> Checking examples/go.mod is tidy"
(cd examples && go mod tidy -diff)

echo "==> Checking external consumer go.mod is tidy"
(cd internal/testdata/consumer && go mod tidy -diff)

echo "==> Checking tools/go.mod is tidy"
(cd tools && go mod tidy -diff)
