17 lines
242 B
Go
17 lines
242 B
Go
package nf
|
|
|
|
import "strconv"
|
|
|
|
type Err struct {
|
|
Status int
|
|
Msg string
|
|
}
|
|
|
|
func (n Err) Error() string {
|
|
return strconv.Itoa(n.Status) + " " + n.Msg
|
|
}
|
|
|
|
func NewNFError(status int, msg string) Err {
|
|
return Err{Status: status, Msg: msg}
|
|
}
|