Skip to content

Fix gofmt alignment in HostedRunnerImageDetail struct literals#1

Merged
austenstone merged 2 commits intofix-hosted-runner-image-json-tagfrom
copilot/fix-linter-issues
Mar 17, 2026
Merged

Fix gofmt alignment in HostedRunnerImageDetail struct literals#1
austenstone merged 2 commits intofix-hosted-runner-image-json-tagfrom
copilot/fix-linter-issues

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 17, 2026

The gci linter was failing with "File is not properly formatted" due to incorrect struct field alignment in the hosted runner test files.

Changes

  • github/actions_hosted_runners_test.go / github/enterprise_actions_hosted_runners_test.go: Corrected ID field spacing in HostedRunnerImageDetail literals — gofmt requires alignment relative to the longest field name in the block (Size), not the longest across the enclosing struct.
// Before (extra spaces, fails gofmt)
Image: &HostedRunnerImageDetail{
    ID:     Ptr("ubuntu-20.04"),
    Size: Ptr(int64(86)),
},

// After
Image: &HostedRunnerImageDetail{
    ID:   Ptr("ubuntu-20.04"),
    Size: Ptr(int64(86)),
},

Fix applied in 4 locations across both files via gofmt -w.

Original prompt

The linter workflow is failing on the fix-hosted-runner-image-json-tag branch with "Linting: issues found in 1 module directories." Please run the Go linter (golangci-lint or equivalent configured in this repo), identify and fix all linting issues in the code changes on this branch. The generated files are up to date, so the issue is purely linting errors in the Go source code.


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

…Detail structs

Co-authored-by: austenstone <22425467+austenstone@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix linting issues in Go source code Fix gofmt alignment in HostedRunnerImageDetail struct literals Mar 17, 2026
Copilot AI requested a review from austenstone March 17, 2026 12:17
@austenstone austenstone marked this pull request as ready for review March 17, 2026 12:20
@austenstone austenstone merged commit 6c4f74d into fix-hosted-runner-image-json-tag Mar 17, 2026
2 checks passed
@austenstone austenstone deleted the copilot/fix-linter-issues branch March 17, 2026 12:20
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