diff --git a/format.go b/format.go index 6007495..097d01f 100644 --- a/format.go +++ b/format.go @@ -14,9 +14,14 @@ func formatUtf8(in []byte) string { } func formatAny(in interface{}) string { - if _, ok := in.([]byte); ok { + switch in := in.(type) { + case []byte: return "<>" - } - return fmt.Sprintf("%#v", in) + case string: + return in + + default: + return fmt.Sprintf("%#v", in) + } }