Skip to content

fix: perfsprint lint violations in opentelemetry logger plugin#1

Merged
jgerits merged 5 commits into
mainfrom
copilot/build-and-publish-container
Jun 11, 2026
Merged

fix: perfsprint lint violations in opentelemetry logger plugin#1
jgerits merged 5 commits into
mainfrom
copilot/build-and-publish-container

Conversation

Copilot AI commented Jun 8, 2026

Copy link
Copy Markdown

Three perfsprint lint issues in v1/plugins/logger/opentelemetry caused make check to fail. Replaces slow formatting functions with their faster stdlib equivalents.

Changes

  • plugin.go — replace fmt.Errorf with errors.New for a static (non-wrapping) error string; add "errors" import
  • plugin_test.go — replace fmt.Sprintf("%d", ...) / fmt.Sprintf("%t", ...) with strconv.FormatInt / strconv.FormatBool; add "strconv" import
// before
return fmt.Errorf("OpenTelemetry logger already started")
return fmt.Sprintf("%d", v.IntValue)
return fmt.Sprintf("%t", v.BoolValue)

// after
return errors.New("OpenTelemetry logger already started")
return strconv.FormatInt(v.IntValue, 10)
return strconv.FormatBool(v.BoolValue)

@jgerits jgerits marked this pull request as ready for review June 11, 2026 07:53
@jgerits jgerits merged commit 1cbaba1 into main Jun 11, 2026
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.

2 participants