Skip to content

refactor: remove redundant variable declarations in for loops#7761

Merged
johanstokking merged 1 commit into
TheThingsNetwork:v3.35from
efcking:v3.35
Nov 26, 2025
Merged

refactor: remove redundant variable declarations in for loops#7761
johanstokking merged 1 commit into
TheThingsNetwork:v3.35from
efcking:v3.35

Conversation

@efcking

@efcking efcking commented Nov 19, 2025

Copy link
Copy Markdown
Contributor

Summary

The new version of Go has been optimized, and variables do not need to be reassigned.

For more info: https://tip.golang.org/wiki/LoopvarExperiment#does-this-mean-i-dont-have-to-write-x--x-in-my-loops-anymore

Changes

  • ...
  • ...

Testing

Steps

...

Results
Regressions

...

Notes for Reviewers

...

Checklist

  • Scope: The referenced issue is addressed, there are no unrelated changes.
  • Compatibility: The changes are backwards compatible with existing API, storage, configuration and CLI, according to the compatibility commitments in README.md for the chosen target branch.
  • Documentation: Relevant documentation is added or updated.
  • Testing: The steps/process to test this feature are clearly explained including testing for regressions.
  • Infrastructure: If infrastructural changes (e.g., new RPC, configuration) are needed, a separate issue is created in the infrastructural repositories.
  • Changelog: Significant features, behavior changes, deprecations and fixes are added to CHANGELOG.md.
  • Commits: Commit messages follow guidelines in CONTRIBUTING.md, there are no fixup commits left.

@efcking

efcking commented Nov 19, 2025

Copy link
Copy Markdown
Contributor Author

There seem to be a lot of changes. Do I need to split them into multiple PRs to submit?

@johanstokking johanstokking 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.

Thanks, I hope you did this with a regex replace 😁

One small comment.

Comment thread pkg/errors/attributes_test.go Outdated

@nicholaspcr nicholaspcr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks really nice, appreciate the contribution.

@johanstokking

Copy link
Copy Markdown
Member

Thanks @efcking. Please also run:

$ make tools/bin/mage
$ tools/bin/mage go:fmt

Signed-off-by: efcking <efcking@outlook.com>
@efcking

efcking commented Nov 24, 2025

Copy link
Copy Markdown
Contributor Author

Thanks @efcking. Please also run:

$ make tools/bin/mage
$ tools/bin/mage go:fmt

Sorry for handling this so late.

image

I have executed these two commands, merged the commits, and pushed them. So need to review it again. @johanstokking @nicholaspcr @ryaplots

Thank you.

@johanstokking johanstokking merged commit b22b451 into TheThingsNetwork:v3.35 Nov 26, 2025
10 of 15 checks passed
@johanstokking

Copy link
Copy Markdown
Member

Thanks @efcking

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.

4 participants