diff --git a/.drone.yml b/.drone.yml index c0a326d..be19d35 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,6 +7,6 @@ clone: steps: - name: build - image: golang:1.16 + image: golang:1.17 commands: - go test ./... -v diff --git a/client.go b/client.go index 0d26c64..a7e0e46 100644 --- a/client.go +++ b/client.go @@ -137,11 +137,7 @@ func SanitizeURL(token string, u *url.URL) *url.URL { return u } - urlStr := u.String() - if strings.Contains(urlStr, token) { - urlStr = strings.Replace(urlStr, token, "REDACTED", -1) - } - - redactedURL, _ := url.Parse(urlStr) + redacted := strings.Replace(u.String(), token, "REDACTED", -1) + redactedURL, _ := url.Parse(redacted) return redactedURL } diff --git a/go.mod b/go.mod index 38c8330..be3a12d 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,14 @@ module github.com/jbub/fio -go 1.16 +go 1.17 require ( github.com/shopspring/decimal v1.2.0 github.com/stretchr/testify v1.7.0 ) + +require ( + github.com/davecgh/go-spew v1.1.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect +)