Skip to content

Commit 90d1628

Browse files
authored
Merge pull request #55 from knz/20201106-redact-fmt
Bump redact to get the fix to the string builder fmt bug
2 parents 510c8a6 + 2a8e966 commit 90d1628

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

fmttests/format_error_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ Error types: (1) *errbase.errorFormatter (2) *errors.errorString`
6666
f2 := &fmter{}
6767
tt.CheckEqual(string(redact.Sprintf("%v", f2)), sm+`hello`+em)
6868
tt.CheckEqual(string(redact.Sprintf("%+v", f2)), sm+`hello`+em)
69+
70+
// Another regression test.
71+
// https://github.com/cockroachdb/redact/issues/12
72+
var buf redact.StringBuilder
73+
buf.Printf("safe %v", "unsafe")
74+
e := errutil.Newf("%v", buf)
75+
tt.CheckEqual(string(redact.Sprint(e)), `safe `+sm+`unsafe`+em)
6976
}
7077

7178
type fmtWrap struct {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.13
55
require (
66
github.com/cockroachdb/datadriven v1.0.0
77
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f
8-
github.com/cockroachdb/redact v1.0.6
8+
github.com/cockroachdb/redact v1.0.8
99
github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2
1010
github.com/gogo/protobuf v1.3.1
1111
github.com/gogo/status v1.1.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ github.com/cockroachdb/datadriven v1.0.0/go.mod h1:5Ib8Meh+jk1RlHIXej6Pzevx/NLlN
1717
github.com/cockroachdb/errors v1.6.1/go.mod h1:tm6FTP5G81vwJ5lC0SizQo374JNCOPrHyXGitRJoDqM=
1818
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f h1:o/kfcElHqOiXqcou5a3rIlMc7oJbMQkeLk0VQJ7zgqY=
1919
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI=
20-
github.com/cockroachdb/redact v1.0.6 h1:W34uRRyNR4dlZFd0MibhNELsZSgMkl52uRV/tA1xToY=
21-
github.com/cockroachdb/redact v1.0.6/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
20+
github.com/cockroachdb/redact v1.0.8 h1:8QG/764wK+vmEYoOlfobpe12EQcS81ukx/a4hdVMxNw=
21+
github.com/cockroachdb/redact v1.0.8/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
2222
github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 h1:IKgmqgMQlVJIZj19CdocBeSfSaiCbEBZGKODaixqtHM=
2323
github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ=
2424
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=

0 commit comments

Comments
 (0)