2022-01-22 22:10:45 +08:00
|
|
|
package common
|
2019-10-28 00:02:23 +08:00
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2020-12-17 22:17:27 +08:00
|
|
|
errPayload = errors.New("payload error")
|
2022-05-30 21:26:41 +08:00
|
|
|
initFlag bool
|
|
|
|
noResolve = "no-resolve"
|
2019-10-28 00:02:23 +08:00
|
|
|
)
|
|
|
|
|
2022-03-13 01:21:23 +08:00
|
|
|
type Base struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (b *Base) ShouldFindProcess() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2022-03-17 23:24:07 +08:00
|
|
|
func (b *Base) ShouldResolveIP() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2019-10-28 00:02:23 +08:00
|
|
|
func HasNoResolve(params []string) bool {
|
|
|
|
for _, p := range params {
|
|
|
|
if p == noResolve {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|