Source File
errors.go
Belonging Package
github.com/freeeve/gochickpeas/rcpg
package rcpgimport ()// ErrCorrupt reports input bytes that are not a valid file of the expected// format. Every structural problem in a parse surfaces as an error wrapping// this sentinel; parsers never panic on malformed input.var ErrCorrupt = errors.New("corrupt input")// ErrUnsupportedVersion reports a file that is a recognized format but a// newer, unsupported version.var ErrUnsupportedVersion = errors.New("unsupported version")// corruptf wraps ErrCorrupt with positional detail, mirroring the Rust// codec's FormatError::Corrupt(String) messages.func corruptf( string, ...any) error {return fmt.Errorf("%w: %s", ErrCorrupt, fmt.Sprintf(, ...))}// unsupportedVersionf wraps ErrUnsupportedVersion with the format name and// the version the file declared.func unsupportedVersionf( string, uint16) error {return fmt.Errorf("%w: %s version %d", ErrUnsupportedVersion, , )}
![]() |
The pages are generated with Golds v0.8.7. (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. |