Skip to content

Conversation

@TobyX424242
Copy link

  • Fixed a critical error in config.go.
    As explained in Document, original function didn't accept any parameters. Replaced it with appropriate 24 * time.Hour to represent 24 hours
  • Implemented Error handling for various cases instead of drop them silently

@SourLemonJuice SourLemonJuice self-assigned this Oct 6, 2025
@SourLemonJuice
Copy link
Owner

For the time.Duration error in config.go, that does a critical bug, but not because it didn't accept any parameter, but Go actually consider the receiver as the first parameter of that function, they can be swapped even:

time.Hour.Hours()
// ==
time.Hours(time.Hour)

Also, the 24 is an integer, which also the base type of time.Duration, so the compiler missed this before.
This is the first time I know this behavior, thank you for that.

But for the other error checks, I don't really want to grow too much complexity for a Go project, and also the selector.go is under heavy development. So sorry, I can't merge almost code of this PR.

For some other critical bug fixes, they will be added into the next release, like the error check of router.SetTrustedProxies, I really missed this bug :(

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.

2 participants