[update] regexp work

This commit is contained in:
zricethezav committed 2018-01-27 15:35:25 -05:00
1 parent e1a58935ea
commit 595da56eef
2 files changed
+53 -11

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
package main
import (
"bytes"
_ "fmt"
"regexp"
)
func checkRegex(diff []byte) {
var re *regexp.Regexp
var found string
lines := bytes.Split(diff, []byte("\n"))
for _, line := range lines {
if len(line) == 0 {
continue
}
for _, v := range regexes {
re = regexp.MustCompile(v)
found = re.FindString(string(line))
if len(found) == 0 {
continue
}
}
}
}