Pin golangci-lint to commit c0d3ddc9cf3faa61a4e378e879ece580256d76e5
(v2.12.2) in Dockerfile and script/bootstrap.
Set .golangci.yml to the org-standard v2-schema config already used
across the org's repos (owner-authorized; the same file is being
landed as canonical via a prompts-repo PR). Lint settings live under
linters.settings, so the lll, funlen, cyclop, and dupl thresholds are
actually applied. The informational gomodguard deprecation warning
this config can emit under v2.12 is accepted.
Fix all findings surfaced by the now-active thresholds:
- goconst: shared constants for repeated status, priority, and DNS
fixture strings in watcher.go and the notify, state, and watcher
tests
- dupl: consolidate duplicated ntfy/slack HTTP-error tests and
SendNotification endpoint-error tests behind shared helpers
- lll: wrap long test table entries and comments; shorten one inline
nolint justification
- Replace convoluted CI workflow (setup-go, install golangci-lint, install
goimports, make check) with simple 'docker build .' per repo policy
- Pin Docker base images by SHA256 hash instead of mutable tags
- Pin golangci-lint and goimports by commit hash instead of @latest
- Add binutils-gold for linker compatibility on alpine
- Run on all pushes, not just main/PR branches
Full project structure following upaas conventions: uber/fx DI, go-chi
routing, slog logging, Viper config. State persisted as JSON file with
per-nameserver record tracking for inconsistency detection. Stub
implementations for resolver, portcheck, tlscheck, and watcher.