github.com/scottcagno/storage@v1.8.0/pkg/lsmt/util.go (about) 1 package lsmt 2 3 import "regexp" 4 5 func Search(pattern string, input []byte) (bool, error) { 6 re, err := regexp.Compile(pattern) 7 if err != nil { 8 return false, err 9 } 10 return re.Match(input), nil 11 }