You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove deprecated Google API usage.
Summary:
- Remove explicit Spanner SessionPoolConfig usage now that google-cloud-go/spanner uses multiplexed sessions.
- Replace deprecated credentials JSON loading with type-aware WithAuthCredentialsJSON handling and validation.
- Update google.golang.org/api and related transitive dependencies needed for the new credential option.
- Document the Go 1.25 modernization baseline, including Go 1.22 loop-variable semantics.
Validation:
- make check
- CI lint, test, and readme-sync passed
- Gemini summary refreshed; Copilot and Gemini reviewed the current head with no unresolved comments
Copy file name to clipboardExpand all lines: AGENTS.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,12 @@ For full gh-helper command reference, see [dev-docs/issue-management.md](dev-doc
81
81
-**Static patterns**: Precompile at package level (`var patternRe = regexp.MustCompile(...)`)
82
82
-**Dynamic patterns**: Compile at runtime, avoid caching unless profiling shows need
83
83
84
+
### Go Modernization Baseline
85
+
- This module targets Go 1.25. Use language features and standard-library APIs available through Go 1.25 when touching nearby code, while keeping modernization changes scoped.
86
+
- Do not add loop-variable shadow copies only for closure or parallel-subtest safety. Go 1.22+ gives loop variables per-iteration scope for modules declaring `go 1.22` or later.
87
+
- Prefer clear standard-library helpers over older hand-written patterns when they fit: `slices`, `maps`, `cmp.Or`, `min`/`max`, integer `range`, `sync.OnceFunc`/`OnceValue`, `sync.WaitGroup.Go`, `testing.T.Context()`, and `testing.B.Loop()`.
88
+
- Treat modernization as opportunistic cleanup, not a reason for broad churn-only rewrites.
0 commit comments