1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
package bare import ( "errors" "fmt" "reflect" ) var ErrInvalidStr = errors.New("String contains invalid UTF-8 sequences") type UnsupportedTypeError struct { Type reflect.Type } func (e *UnsupportedTypeError) Error() string { return fmt.Sprintf("Unsupported type for marshaling: %s\n", e.Type.String()) }