package option type LogContainS struct { All StringSlice // grep A | grep B Any StringSlice // grep -E "A|B" AllNot StringSlice // grep -v A | grep -v B AnyNot StringSlice // grep -v "A" or grep -v "B" Err bool // error always retain Warn bool // warn always retain } const ( LogContainName = "log-contain" LogContainNameAll = LogContainName + "-" + "all" LogContainNameAny = LogContainName + "-" + "any" LogContainNameAllNot = LogContainName + "-" + "all-not" LogContainNameAnyNot = LogContainName + "-" + "any-not" LogContainNameErr = LogContainName + "-" + "err" LogContainNameWarn = LogContainName + "-" + "warn" ) const ( LogContainDescAll = "log contain all keywords" LogContainDescAny = "log contain one of keywords" LogContainDescAnyNot = "log not contain one of keywords" LogContainDescAllNot = "log not contain both keywords at the same time" LogContainDescErr = "log always contain error level" LogContainDescWarn = "log always contain warn level" ) var LogContain = LogContainS{ All: StringSlice{}, Any: StringSlice{}, AllNot: StringSlice{}, AnyNot: StringSlice{}, Err: true, Warn: true, } func (l LogContainS) Reset() { }