refactor: move scrubber into its own package (#393)
Also part of https://github.com/ooni/probe/issues/1687
This commit is contained in:
parent
760ac905d6
commit
75ae99e9d4
4 changed files with 11 additions and 8 deletions
|
|
@ -8,6 +8,8 @@ import (
|
|||
"fmt"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/ooni/probe-cli/v3/internal/scrubber"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -287,7 +289,7 @@ func toFailureString(err error) string {
|
|||
return FailureGenericTimeoutError
|
||||
}
|
||||
formatted := fmt.Sprintf("unknown_failure: %s", s)
|
||||
return Scrub(formatted) // scrub IP addresses in the error
|
||||
return scrubber.Scrub(formatted) // scrub IP addresses in the error
|
||||
}
|
||||
|
||||
func toOperationString(err error, operation string) string {
|
||||
|
|
|
|||
Loading…
Reference in a new issue