Skip to content

Comments

Run go fix#8636

Open
mcpherrinm wants to merge 1 commit intomainfrom
mattm-go-fix
Open

Run go fix#8636
mcpherrinm wants to merge 1 commit intomainfrom
mattm-go-fix

Conversation

@mcpherrinm
Copy link
Contributor

@mcpherrinm mcpherrinm commented Feb 20, 2026

This runs the updated go fix ./… from Go 1.26

There are some more fixes once Boulder updates to Go 1.26 - these are just for
the current Go 1.25.

Fixes applied:

  • Use strings.Cut instead of strings.Index and manual slicing
  • Remove some obsolete tc := tc captures
  • Use a strings.Builder to avoid quadratic string building
  • Use reflect.TypeFor instead of reflect.TypeOf

This runs the updated `go fix` from Go 1.26

There are some more fixes once Boulder updates to Go 1.26 - these are just for
the current Go 1.25.
@mcpherrinm mcpherrinm requested a review from a team as a code owner February 20, 2026 05:37
Copy link
Contributor

@aarongable aarongable left a comment

Choose a reason for hiding this comment

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

I was planning on waiting until go1.26 to run this tool, but LGTM.

Could you provide more details about exactly what go fix command(s) you ran? Did you limit it to certain analyzers or certain files?

@mcpherrinm
Copy link
Contributor Author

mcpherrinm commented Feb 20, 2026

The invocation was go fix ./… - all fixes on all the files. Updated PR description to make that more explicit

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