Skip to content

refactor: use slices.Backward in internal/manifest/validate.go - #784

Merged
mwbrooks merged 1 commit into
mainfrom
mwbrooks-modernize-manifest-validate
Nov 13, 2026
Merged

mwbrooks merged 1 commit into
mainfrom
mwbrooks-modernize-manifest-validate

Conversation

@mwbrooks

Copy link
Copy Markdown
Member

Changelog

N/A - internal cleanup with no user-facing changes.

Summary

This pull request replaces a reverse index loop with slices.Backward in internal/manifest/validate.go for maintainers, from the Go modernize analyzer. Same behaviour, in the form current Go recommends.

  • Uses range slices.Backward(slackError.Details) in HandleConnectorApprovalRequired instead of counting down from len(slackError.Details) - 1, and still deletes in place

Testing

  1. Run go run golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest ./... and confirm internal/manifest/validate.go no longer reports slices.Backward
  2. Run go build ./... && go test ./...

Requirements

@mwbrooks
mwbrooks requested a review from a team as a code owner November 13, 2026 17:25
@mwbrooks mwbrooks added this to the Next Release milestone Nov 13, 2026
@mwbrooks mwbrooks added code health M-T: Test improvements and anything that improves code health semver:patch Use on pull requests to describe the release version increment labels Nov 13, 2026
@mwbrooks mwbrooks self-assigned this Nov 13, 2026

@zimeg zimeg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🧹 @mwbrooks LGTM! Clean swap to slices.Backward, same reverse-delete behavior preserved.

@mwbrooks

Copy link
Copy Markdown
Member Author

Thanks @zimeg for the quick review! 🙇

@mwbrooks
mwbrooks merged commit f2de973 into main Nov 13, 2026
13 checks passed
@mwbrooks
mwbrooks deleted the mwbrooks-modernize-manifest-validate branch November 13, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code health M-T: Test improvements and anything that improves code health semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants