Refactor Build for Go#753
Draft
raykroeker wants to merge 1 commit into
Draft
Conversation
raykroeker
commented
May 26, 2026
- Add go.just and write generic recipes for build, test and lint for go.
- Adjust github workflow for go to use general recipe for testing.
- Add meta-recipes go-build and go-test to build and test all go binary and library code.
- Adjust go-lint to cover the internal pkg/ package.
- Add flag to gofmt to report all issues (-e) versus the first 10.
- Adjust recipe dependencies and remove specific recipes in favour of general ones.A
- Fix lint issues in the iptables package.
* Add go.just and write generic recipes for build, test and lint for go. * Adjust github workflow for go to use general recipe for testing. * Add meta-recipes go-build and go-test to build and test all go binary and library code. * Adjust go-lint to cover the internal pkg/ package. * Add flag to gofmt to report all issues (-e) versus the first 10. * Adjust recipe dependencies and remove specific recipes in favour of general ones.A * Fix lint issues in the iptables package.
raykroeker
commented
May 26, 2026
| if !reflect.DeepEqual(tt.expected, check) { | ||
| t.Fatalf("expected port range does not match check '%v'<>'%v'", | ||
| tt.expected, check) | ||
| } |
Author
There was a problem hiding this comment.
Adding lint checks to pkg/ indicated t was unused.
raykroeker
commented
May 26, 2026
| func (fc FirewallConfiguration) makeJumpFromChainToAnotherForAllProtocols(chainName string, targetChain string, comment string, deleteChain bool) *exec.Cmd { | ||
| action := "-A" | ||
| if delete { | ||
| if deleteChain { |
raykroeker
commented
May 26, 2026
| destinationSlices := make([][]string, 0) | ||
| destinationPortCount := 0 | ||
| if portsToIgnore == nil || len(portsToIgnore) < 1 { | ||
| if len(portsToIgnore) < 1 { |
Author
There was a problem hiding this comment.
portsToIgnore == nil is a lint triger.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.