go-json/export_test.go

19 lines
323 B
Go
Raw Normal View History

2020-08-12 19:21:10 +03:00
package json
import "reflect"
2020-08-12 19:21:10 +03:00
func NewSyntaxError(msg string, offset int64) *SyntaxError {
return &SyntaxError{
msg: msg,
Offset: offset,
}
}
func NewMarshalerError(typ reflect.Type, err error, msg string) *MarshalerError {
return &MarshalerError{
Type: typ,
Err: err,
sourceFunc: msg,
}
}