Skip to content

refactor: move codebase to go 1.26#4149

Merged
cgrinds merged 1 commit into
mainfrom
cbg-next-go
Feb 19, 2026
Merged

refactor: move codebase to go 1.26#4149
cgrinds merged 1 commit into
mainfrom
cbg-next-go

Conversation

@cgrinds
Copy link
Copy Markdown
Collaborator

@cgrinds cgrinds commented Feb 18, 2026

Copilot AI review requested due to automatic review settings February 18, 2026 17:49
@cla-bot cla-bot Bot added the cla-signed label Feb 18, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the repository’s Go language version to Go 1.26 and applies the related syntax modernizations across the codebase to reduce boilerplate (notably around error type matching and pointer-to-literal patterns).

Changes:

  • Bump go directives to Go 1.26 / 1.26.0 across modules.
  • Replace errors.As + temp variables with errors.AsType[T] in multiple call sites.
  • Replace “take address of local temp” patterns with new(<expr>) pointer creation where applicable.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/errs/ontap.go Uses errors.AsType[*RestError] to simplify REST error detection.
pkg/conf/conf_test.go Simplifies boolean pointer setup with new(true/false) in tests.
pkg/conf/conf.go Uses new(logSet.GetAllChildNamesS()) instead of local var + address.
pkg/api/ontapi/zapi/client.go Refactors HarvestError detection to errors.AsType.
mcp/go.mod Updates module Go version to 1.26.
integration/test/promtool_metrics_test.go Refactors ExitError detection to errors.AsType.
integration/test/copy_logs_test.go Refactors ExitError detection to errors.AsType.
integration/go.mod Updates module Go version to 1.26.0.
integration/certer/main.go Refactors OntapError detection to errors.AsType.
go.mod Updates main module Go version to 1.26.0.
cmd/tools/rest/rest.go Refactors RestError detection to errors.AsType.
cmd/tools/rest/client.go Refactors RestError detection to errors.AsType.
cmd/poller/poller.go Uses new(append(...)) to avoid temp slice variable when updating templates.
cmd/exporters/victoriametrics/victoriametrics.go Uses new(<expr>) for default pointers and URL pointer creation.
cmd/exporters/influxdb/influxdb.go Uses new(<expr>) for default pointers and URL pointer creation.
cmd/collectors/storagegrid/rest/client.go Refactors StorageGridError detection to errors.AsType.
cmd/collectors/power.go Refactors RestError detection to errors.AsType (with status check).
cmd/collectors/eseries/rest/client.go Refactors RestError detection to errors.AsType.
cmd/collectors/discovery.go Refactors HarvestError detection to errors.AsType.
cmd/collectors/cisco/rest/client.go Refactors HarvestError detection to errors.AsType.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cgrinds cgrinds merged commit db70c01 into main Feb 19, 2026
16 checks passed
@cgrinds cgrinds deleted the cbg-next-go branch February 19, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants