mirror of
https://github.com/golang/go
synced 2024-11-18 11:14:39 -07:00
internal/telemetry/event: fix error/value key type tag formatting
%v behaves better with nil values. Change-Id: I4041f5460173c8f420553996d64d9463ef5a0370 Reviewed-on: https://go-review.googlesource.com/c/tools/+/227355 Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by: Robert Findley <rfindley@google.com>
This commit is contained in:
parent
1fd976651f
commit
066fd1390e
@ -106,9 +106,9 @@ func (t Tag) Format(f fmt.State, r rune) {
|
||||
case *StringKey:
|
||||
fmt.Fprintf(f, "%s=%q", key.Name(), key.From(t))
|
||||
case *ErrorKey:
|
||||
fmt.Fprintf(f, "%s=%q", key.Name(), key.From(t))
|
||||
fmt.Fprintf(f, "%s=%v", key.Name(), key.From(t))
|
||||
case *ValueKey:
|
||||
fmt.Fprintf(f, "%s=%q", key.Name(), key.From(t))
|
||||
fmt.Fprintf(f, "%s=%v", key.Name(), key.From(t))
|
||||
default:
|
||||
fmt.Fprintf(f, `%s="invalid type %T"`, key.Name(), key)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user