package common import "strings" // KeywordsCheck - check if one of the keyword from the group is included in the // string. Returns false if no word was found, or true otherwise and also this word // itself func KeywordsCheck(line string, keywords ...string) (bool, string) { for _, key := range keywords { if strings.Contains(line, key) { return true, key } } return false, "" }