fork github.com/doug-martin

This commit is contained in:
2025-03-22 23:02:05 +08:00
commit f14642a736
131 changed files with 34555 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
package errors
import "fmt"
type Error struct {
err string
}
func New(message string, args ...interface{}) error {
return Error{err: "db: " + fmt.Sprintf(message, args...)}
}
func NewEncodeError(t interface{}) error {
return Error{err: "db_encode_error: " + fmt.Sprintf("Unable to encode value %+v", t)}
}
func (e Error) Error() string {
return e.err
}