zarf-dev / zarf

DevSecOps for Air Gap & Limited-Connection Systems. https://zarf.dev/
Apache License 2.0
1.34k stars 162 forks source link

Remove use of named returns #2950

Closed phillebaba closed 5 days ago

phillebaba commented 2 weeks ago

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

mkcp commented 5 days ago

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