Source File
errors.go
Belonging Package
github.com/francoispqt/gojay
package gojayimport ()const invalidJSONCharErrorMsg = "Invalid JSON, wrong char '%c' found at position %d"// InvalidJSONError is a type representing an error returned when// Decoding encounters invalid JSON.type InvalidJSONError stringfunc ( InvalidJSONError) () string {return string()}func ( *Decoder) ( int) error {var byteif len(.data) > {= .data[]}.err = InvalidJSONError(fmt.Sprintf(invalidJSONCharErrorMsg,,,),)return .err}const invalidUnmarshalErrorMsg = "Cannot unmarshal JSON to type '%T'"// InvalidUnmarshalError is a type representing an error returned when// Decoding cannot unmarshal JSON to the receiver type for various reasons.type InvalidUnmarshalError stringfunc ( InvalidUnmarshalError) () string {return string()}func ( *Decoder) ( interface{}) error {return InvalidUnmarshalError(fmt.Sprintf(invalidUnmarshalErrorMsg,,),)}const invalidMarshalErrorMsg = "Invalid type %T provided to Marshal"// InvalidMarshalError is a type representing an error returned when// Encoding did not find the proper way to encodetype InvalidMarshalError stringfunc ( InvalidMarshalError) () string {return string()}// NoReaderError is a type representing an error returned when// decoding requires a reader and none was giventype NoReaderError stringfunc ( NoReaderError) () string {return string()}// InvalidUsagePooledDecoderError is a type representing an error returned// when decoding is called on a still pooled Decodertype InvalidUsagePooledDecoderError stringfunc ( InvalidUsagePooledDecoderError) () string {return string()}// InvalidUsagePooledEncoderError is a type representing an error returned// when decoding is called on a still pooled Encodertype InvalidUsagePooledEncoderError stringfunc ( InvalidUsagePooledEncoderError) () string {return string()}// ErrUnmarshalPtrExpected is the error returned when unmarshal expects a pointer value,// When using `dec.ObjectNull` or `dec.ArrayNull` for example.var ErrUnmarshalPtrExpected = errors.New("Cannot unmarshal to given value, a pointer is expected")
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |