增加IP动作

This commit is contained in:
GoEdgeLab
2021-02-06 17:34:33 +08:00
parent b457277b6e
commit 644aa401a2
22 changed files with 1406 additions and 11 deletions

View File

@@ -0,0 +1,22 @@
package iplibrary
// 是否是致命错误
type FataError struct {
err string
}
func (this *FataError) Error() string {
return this.err
}
func NewFataError(err string) error {
return &FataError{err: err}
}
func IsFatalError(err error) bool {
if err == nil {
return false
}
_, ok := err.(*FataError)
return ok
}