Skip to content

Fix perfsprint lint: replace fmt.Sprintf with string concatenation in git.go#20977

Merged
lpcox merged 2 commits intoclaude/ghes-auto-detect-configfrom
copilot/67083185060-fix-lint-go-workflow
Mar 14, 2026
Merged

Fix perfsprint lint: replace fmt.Sprintf with string concatenation in git.go#20977
lpcox merged 2 commits intoclaude/ghes-auto-detect-configfrom
copilot/67083185060-fix-lint-go-workflow

Conversation

Copy link
Contributor

Copilot AI commented Mar 14, 2026

The lint-go CI job was failing due to a perfsprint violation in pkg/cli/git.go.

Change

Replace unnecessary fmt.Sprintf with direct string concatenation:

// Before
"api." + fmt.Sprintf("api.%s", host)

// After
"api." + host
Original prompt

Fix the failing GitHub Actions workflow lint-go
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.
Job ID: 67083185060
Job URL: https://github.com/github/gh-aw/actions/runs/23093930698/job/67083185060


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
@lpcox lpcox marked this pull request as ready for review March 14, 2026 19:07
Copilot AI review requested due to automatic review settings March 14, 2026 19:07
@lpcox lpcox merged commit b817786 into claude/ghes-auto-detect-config Mar 14, 2026
Copilot AI changed the title [WIP] [67083185060] Fix failing GitHub Actions workflow lint-go Fix perfsprint lint: replace fmt.Sprintf with string concatenation in git.go Mar 14, 2026
@lpcox lpcox deleted the copilot/67083185060-fix-lint-go-workflow branch March 14, 2026 19:07
Copilot AI requested a review from lpcox March 14, 2026 19:07
Copilot stopped work on behalf of lpcox due to an error March 14, 2026 19:07
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

Fixes a Go lint failure in the lint-go GitHub Actions job by replacing an unnecessary fmt.Sprintf call with string concatenation to satisfy the perfsprint linter.

Changes:

  • Replace fmt.Sprintf("api.%s", host) with "api." + host when building GHES allowed domains.

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

You can also share your feedback on Copilot code review. Take the survey.

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