We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1f0148 commit 9b85893Copy full SHA for 9b85893
rule/file-header.go
@@ -42,9 +42,9 @@ func (r *FileHeaderRule) Apply(file *lint.File, arguments lint.Arguments) []lint
42
comment := ""
43
for _, c := range g.List {
44
text := c.Text
45
- if multiRegexp.Match([]byte(text)) {
+ if multiRegexp.MatchString(text) {
46
text = text[2 : len(text)-2]
47
- } else if singleRegexp.Match([]byte(text)) {
+ } else if singleRegexp.MatchString(text) {
48
text = text[2:]
49
}
50
comment += text
@@ -55,7 +55,7 @@ func (r *FileHeaderRule) Apply(file *lint.File, arguments lint.Arguments) []lint
55
panic(err.Error())
56
57
58
- if !regex.Match([]byte(comment)) {
+ if !regex.MatchString(comment) {
59
return failure
60
61
return nil
0 commit comments