• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package common
2
3import "strings"
4
5// KeywordsCheck - check if one of the keyword from the <keywords> group is included in the
6// <line> string. Returns false if no word was found, or true otherwise and also this word
7// itself
8func KeywordsCheck(line string, keywords ...string) (bool, string) {
9	for _, key := range keywords {
10		if strings.Contains(line, key) {
11			return true, key
12		}
13	}
14	return false, ""
15}
16