...

Source file src/github.com/doug-martin/goqu/v9/internal/errors/error.go

Documentation: github.com/doug-martin/goqu/v9/internal/errors

     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  }
    20  

View as plain text