2019-10-28 00:02:23 +08:00
|
|
|
package rules
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2020-07-19 13:17:05 +08:00
|
|
|
errPayload = errors.New("payload error")
|
|
|
|
errParams = errors.New("params error")
|
|
|
|
ErrPlatformNotSupport = errors.New("not support on this platform")
|
2020-07-22 19:05:10 +08:00
|
|
|
ErrInvalidNetwork = errors.New("invalid network")
|
2019-10-28 00:02:23 +08:00
|
|
|
|
|
|
|
noResolve = "no-resolve"
|
|
|
|
)
|
|
|
|
|
|
|
|
func HasNoResolve(params []string) bool {
|
|
|
|
for _, p := range params {
|
|
|
|
if p == noResolve {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|