Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove use of named returns #2950

Closed
Tracked by #2953
phillebaba opened this issue Aug 30, 2024 · 1 comment · Fixed by #2979 or #2987
Closed
Tracked by #2953

Remove use of named returns #2950

phillebaba opened this issue Aug 30, 2024 · 1 comment · Fixed by #2979 or #2987
Assignees
Milestone

Comments

@phillebaba
Copy link
Member

While use of named returns is not directly wrong, it is a matter of taste whether to use them or not. From experience it has a tendency to cause confusion both when understanding code and immediately seeing what data is actually returned. There are a few cases where named returns are needed but we should be explicit when using them in these cases.

Checking for named returns can be done with the linter using nonamedreturns.
https://golangci-lint.run/usage/linters/#nonamedreturns

@github-project-automation github-project-automation bot moved this to Backlog in Zarf Aug 30, 2024
@mkcp mkcp self-assigned this Sep 6, 2024
github-merge-queue bot pushed a commit that referenced this issue Sep 10, 2024
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
@github-project-automation github-project-automation bot moved this from Backlog to Done in Zarf Sep 10, 2024
@mkcp mkcp reopened this Sep 10, 2024
@mkcp
Copy link
Contributor

mkcp commented Sep 10, 2024

Need to run another PR on stuff outside of pkg before we can mark this done!

@mkcp mkcp added this to the v0.40.0 milestone Sep 10, 2024
@mkcp mkcp closed this as completed by moving to Done in Zarf Sep 10, 2024
github-merge-queue bot pushed a commit that referenced this issue Sep 11, 2024
…#2950 (#2987)

Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
2 participants