parent
deac951551
commit
db6c11f455
@ -1,16 +0,0 @@ |
||||
package errors |
||||
|
||||
import "fmt" |
||||
|
||||
// InternalError error
|
||||
type InternalError string |
||||
|
||||
// Error message
|
||||
func (ie InternalError) Error() string { |
||||
return fmt.Sprintf("internal error, %s", string(ie)) |
||||
} |
||||
|
||||
// InternalErrorf function creates an instance of InternalError
|
||||
func InternalErrorf(format string, params ...interface{}) error { |
||||
return InternalError(fmt.Sprintf(format, params...)) |
||||
} |
@ -1,16 +0,0 @@ |
||||
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...)) |
||||
} |
@ -1,16 +0,0 @@ |
||||
package errors |
||||
|
||||
import "fmt" |
||||
|
||||
// NotFound error
|
||||
type NotFound string |
||||
|
||||
// Error message
|
||||
func (nf NotFound) Error() string { |
||||
return fmt.Sprintf("can not find, %s", string(nf)) |
||||
} |
||||
|
||||
// NotFoundErrorf function creates an instance of BadRequestError
|
||||
func NotFoundErrorf(format string, params ...interface{}) error { |
||||
return NotFound(fmt.Sprintf(format, params...)) |
||||
} |
Loading…
Reference in new issue