github.com/kelleygo/clashcore@v1.0.2/rules/common/base.go (about) 1 package common 2 3 import ( 4 "errors" 5 ) 6 7 var ( 8 errPayload = errors.New("payloadRule error") 9 noResolve = "no-resolve" 10 ) 11 12 type Base struct { 13 } 14 15 func (b *Base) ShouldFindProcess() bool { 16 return false 17 } 18 19 func (b *Base) ShouldResolveIP() bool { 20 return false 21 } 22 23 func HasNoResolve(params []string) bool { 24 for _, p := range params { 25 if p == noResolve { 26 return true 27 } 28 } 29 return false 30 }