Always escape a slice of bytes Use `formatString()` to format a value of type `[]byte` but `formatSlice()` which formats the slice into an array of `uint8`. Fixes #147
diff --git a/format/format.go b/format/format.go index 226b892..38d5d79 100644 --- a/format/format.go +++ b/format/format.go
@@ -143,9 +143,6 @@ case reflect.Ptr: return formatValue(value.Elem(), indentation) case reflect.Slice: - if value.Type().Elem().Kind() == reflect.Uint8 { - return formatString(value.Bytes(), indentation) - } return formatSlice(value, indentation) case reflect.String: return formatString(value.String(), indentation)