github.com/doug-martin/goqu/v9@v9.19.0/internal/errors/error.go (about) 1 package errors 2 3 import "fmt" 4 5 type Error struct { 6 err string 7 } 8 9 func New(message string, args ...interface{}) error { 10 return Error{err: "goqu: " + fmt.Sprintf(message, args...)} 11 } 12 13 func NewEncodeError(t interface{}) error { 14 return Error{err: "goqu_encode_error: " + fmt.Sprintf("Unable to encode value %+v", t)} 15 } 16 17 func (e Error) Error() string { 18 return e.err 19 }