#!/usr/bin/env bash
set -euo pipefail
export GOPROXY=off GOFLAGS=-mod=mod
go build ./... 2>&1
go test ./... 2>&1
grep -q 'cache.New(' cmd/serve/main.go || { echo "the call site is gone rather than fixed"; exit 1; }
grep -q 'maxSize int' internal/cache/cache.go || { echo "eviction was removed instead of the caller being updated"; exit 1; }
echo "builds"