Skip to content

Conversation

@benjojo
Copy link
Collaborator

@benjojo benjojo commented Jan 19, 2023

This is the output of my initial pass through the code, fixing things that either are small "this could go wrong" or just simplifying some areas out completely.

I also improved the error messages from the packages, sometimes just setting their capitalisation to what you would mostly expect from go programs, but also adding clarification on some of them.

The default value of runtime.GOMAXPROCS is the number of CPUs. So
there is no need for this line to exist.
They serve the same function, but it's more understandable what
is going on. go-static-check raises this as a warning
IP.Equal handles some edge cases inside how IP addresses are represented
rather than just flat out comparing some byte arrays blindly.
if err != nil {
log.Fatal(err)
}
defer ff.Close()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good catch!

Copy link
Collaborator

@ties ties left a comment

Choose a reason for hiding this comment

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

Imo this is a good set of cleanups and small refactorings.

@benjojo benjojo merged commit 634ed94 into master Jan 19, 2023
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.

3 participants