MatchFileSignature will check the given line with the stored regex
(line []byte)
| 178 | |
| 179 | // MatchFileSignature will check the given line with the stored regex |
| 180 | func (header *Header) MatchFileSignature(line []byte) bool { |
| 181 | if header.SignatureRegex != nil { |
| 182 | return header.SignatureRegex.Match(line) |
| 183 | } |
| 184 | |
| 185 | return false |
| 186 | } |
| 187 | |
| 188 | func ParseFile(input []byte) (f *File, err error) { |
| 189 | // This is just so if we have an error, we can exit cleanly and return the parse error to the user |