stringify tries a bit to stringify v, without using fmt, since we don't want context depending on the unicode tables. This is only used by *valueCtx.String().
(v interface{})
| 90 | // want context depending on the unicode tables. This is only used by |
| 91 | // *valueCtx.String(). |
| 92 | func stringify(v interface{}) string { |
| 93 | switch s := v.(type) { |
| 94 | case stringer: |
| 95 | return s.String() |
| 96 | case string: |
| 97 | return s |
| 98 | } |
| 99 | return "<not Stringer>" |
| 100 | } |