This repository has been archived on 2025-03-03. You can view files and clone it, but cannot push or open issues or pull requests.
chronozinc/parsing/match.go
2016-12-05 16:35:06 +01:00

17 lines
227 B
Go

package parsing
import (
"fmt"
"regexp"
)
func Match(file []byte, dict map[string]*regexp.Regexp) string {
for key, reg := range dict {
fmt.Printf("test %s", key)
if reg.Match(file) {
return key
}
}
return ""
}