Source File
decode.go
Belonging Package
github.com/dunglas/httpsfv
package httpsfvimport ()// ErrUnexpectedEndOfString is returned when the end of string is unexpected.var ErrUnexpectedEndOfString = errors.New("unexpected end of string")// ErrUnrecognizedCharacter is returned when an unrecognized character in encountered.var ErrUnrecognizedCharacter = errors.New("unrecognized character")// UnmarshalError contains the underlying parsing error and the position at which it occurred.type UnmarshalError struct {off interr error}func ( *UnmarshalError) () string {if .err != nil {return fmt.Sprintf("%s: character %d", .err, .off)}return fmt.Sprintf("unmarshal error: character %d", .off)}func ( *UnmarshalError) () error {return .err}type scanner struct {data stringoff int}// scanWhileSp consumes spaces.func ( *scanner) () {for !.eof() {if .data[.off] != ' ' {return}.off++}}// scanWhileOWS consumes optional white space (OWS) characters.func ( *scanner) () {for !.eof() {:= .data[.off]if != ' ' && != '\t' {return}.off++}}// eof returns true if the parser consumed all available characters.func ( *scanner) () bool {return .off == len(.data)}
![]() |
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. |