You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go 1.16 closes an issue that caused many programs to be forced to use substring error matching in order to identify the usage of a closed network connection. The new net.ErrClosed error allows programs to properly check for this error.
I think this is a rule that fits well in semgrep-go, perhaps just as a suggestion? Something like this:
severity:error rule:.rules.use-net-errclosed: did you want errors.Is(err, net.ErrClosed) instead? 10: if !strings.Contains(err.Error(), "use of closed network connection") {
What do you think? Would it make sense for you? If you agree, I could try to contribute this rule (still learning how semgrep works) to the repository once Go 1.16 is released.
Best,
Miguel
The text was updated successfully, but these errors were encountered:
Hi,
Go 1.16 closes an issue that caused many programs to be forced to use substring error matching in order to identify the usage of a closed network connection. The new
net.ErrClosed
error allows programs to properly check for this error.I think this is a rule that fits well in
semgrep-go
, perhaps just as a suggestion? Something like this:What do you think? Would it make sense for you? If you agree, I could try to contribute this rule (still learning how semgrep works) to the repository once Go 1.16 is released.
Best,
Miguel
The text was updated successfully, but these errors were encountered: