refactor(netxlite/errorsx): extract string-suffix classifier (#482)
This change makes the code more tidy and easier to read. No functional change, though. See https://github.com/ooni/probe/issues/1591.
This commit is contained in:
parent
a56b284b0e
commit
b7786a7324
6 changed files with 17 additions and 18 deletions
|
|
@ -1,5 +1,5 @@
|
|||
// Code generated by go generate; DO NOT EDIT.
|
||||
// Generated: 2021-09-07 20:26:06.502417 +0200 CEST m=+0.133209876
|
||||
// Generated: 2021-09-07 20:42:20.172357 +0200 CEST m=+0.135433792
|
||||
|
||||
package errorsx
|
||||
|
||||
|
|
@ -64,9 +64,6 @@ const (
|
|||
// proper OONI error. Returns the OONI error string
|
||||
// on success, an empty string otherwise.
|
||||
func classifySyscallError(err error) string {
|
||||
// filter out system errors: necessary to detect all windows errors
|
||||
// https://github.com/ooni/probe/issues/1526 describes the problem
|
||||
// of mapping localized windows errors.
|
||||
var errno syscall.Errno
|
||||
if !errors.As(err, &errno) {
|
||||
return ""
|
||||
|
|
|
|||
Loading…
Reference in a new issue