nf/error.go
2024-01-12 19:18:33 +08:00

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