Skip to content

fix: address outstanding goconst linter errors on main#7950

Merged
awesomenix merged 1 commit intomainfrom
cameissner/fix-goconst-lint
Feb 25, 2026
Merged

fix: address outstanding goconst linter errors on main#7950
awesomenix merged 1 commit intomainfrom
cameissner/fix-goconst-lint

Conversation

@cameronmeissner
Copy link
Contributor

What this PR does / why we need it:

addresses golang-ci-lint failures on main

Which issue(s) this PR fixes:

Fixes #

Copy link
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 addresses golangci-lint goconst findings by deduplicating repeated encoding string literals used across the agent package’s cloud-init/ignition handling and related tests.

Changes:

  • Introduces shared package-level constants for common encodings (gzip, base64) in pkg/agent/baker.go.
  • Replaces repeated "gzip" string literals with encodingGZIP in both implementation and tests.
  • Simplifies a test-only encoding type alias in baker_test.go by using string directly.

Reviewed changes

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

File Description
pkg/agent/baker.go Adds encodingGZIP / encodingBase64 constants and uses them in encoding/decoding logic.
pkg/agent/baker_test.go Updates tests to use encodingGZIP and removes a redundant test-local encoding type/const.

@awesomenix awesomenix merged commit 5f069d9 into main Feb 25, 2026
23 of 26 checks passed
@awesomenix awesomenix deleted the cameissner/fix-goconst-lint branch February 25, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants