Compare commits
2 Commits
55e928d3cf
...
97326339f8
Author | SHA1 | Date |
---|---|---|
Charles Iliya Krempeaux | 97326339f8 | |
Charles Iliya Krempeaux | 6328092055 |
|
@ -10,6 +10,10 @@ const (
|
||||||
ErrUnexpectedEndOfFile = erorr.Error("rfc8259: unexpected end-of-file")
|
ErrUnexpectedEndOfFile = erorr.Error("rfc8259: unexpected end-of-file")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func ErrInternalError(msg string) error {
|
||||||
|
return erorr.Errorf("rfc8259: JSON parser had an unexpected internal-error — %s", msg)
|
||||||
|
}
|
||||||
|
|
||||||
func ErrProblemReadingRune(err error) error {
|
func ErrProblemReadingRune(err error) error {
|
||||||
return erorr.Errorf("rfc8259: JSON parser had a problem — problem reading rune: %w", err)
|
return erorr.Errorf("rfc8259: JSON parser had a problem — problem reading rune: %w", err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,10 @@ func TestParse_success(t *testing.T) {
|
||||||
Value: []byte("0"),
|
Value: []byte("0"),
|
||||||
Expected: rfc8259naturalnumber.Zero(),
|
Expected: rfc8259naturalnumber.Zero(),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Value: []byte("-0"),
|
||||||
|
Expected: rfc8259naturalnumber.Something("-0"),
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue