Skip to content

Commit 842ede0

Browse files
committed
...
1 parent fadcd8a commit 842ede0

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

pkg/systemlogmonitor/logwatchers/filelog/log_watcher.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ func (s *filelogWatcher) watchLoop() {
134134
}
135135

136136
func (s *filelogWatcher) filterSkipList(line string) bool {
137-
for _ , skipItem := range s.cfg.SkipList {
137+
for _, skipItem := range s.cfg.SkipList {
138138
if strings.Contains(line, skipItem) {
139139
return true
140140
}

pkg/systemlogmonitor/logwatchers/filelog/log_watcher_test.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,22 +185,21 @@ func TestFilterSkipList(t *testing.T) {
185185
},
186186
},
187187
}
188-
testcase := []struct{
189-
log string
188+
testcase := []struct {
189+
log string
190190
expect bool
191191
}{
192192
{
193-
log: `Jan 2 03:04:03 kernel: [0.000000] 1`,
193+
log: `Jan 2 03:04:03 kernel: [0.000000] 1`,
194194
expect: false,
195195
},
196196
{
197-
log: `Jan 2 03:04:04 audit: [1.000000] 2`,
197+
log: `Jan 2 03:04:04 audit: [1.000000] 2`,
198198
expect: true,
199199
},
200200
{
201-
log: `Jan 2 03:04:05 kubelet: [2.000000] 3`,
201+
log: `Jan 2 03:04:05 kubelet: [2.000000] 3`,
202202
expect: true,
203-
204203
},
205204
}
206205
for i, test := range testcase {

0 commit comments

Comments
 (0)