diff --git a/src/context/context.go b/src/context/context.go index 77298f6531c7cb9cb458573fc85c537ec8815ea2..ad67d2301d15bf6e70eba525d074e7277b6c87c1 100644 --- a/src/context/context.go +++ b/src/context/context.go @@ -497,10 +497,10 @@ type valueCtx struct { // want context depending on the unicode tables. This is only used by // *valueCtx.String(). func stringify(v interface{}) string { - if s, ok := v.(stringer); ok { + switch s := v.(type) { + case stringer: return s.String() - } - if s, ok := v.(string); ok { + case string: return s } return "<not Stringer>"