mirror of
https://github.com/mainnika/mongox-go-driver.git
synced 2026-07-03 17:22:33 +00:00
Malformed error
This commit is contained in:
@@ -0,0 +1,16 @@
|
|||||||
|
package errors
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
|
// Malformed error
|
||||||
|
type Malformed string
|
||||||
|
|
||||||
|
// Error message
|
||||||
|
func (m Malformed) Error() string {
|
||||||
|
return fmt.Sprintf("Malformed, %s", string(m))
|
||||||
|
}
|
||||||
|
|
||||||
|
// Malformedf creates an instance of Malformed
|
||||||
|
func Malformedf(format string, params ...interface{}) error {
|
||||||
|
return Malformed(fmt.Sprintf(format, params...))
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user