@@ -99,10 +99,9 @@ func Test_chSeverity(t *testing.T) {
99
99
100
100
func Test_trimK8sPreamble (t * testing.T ) {
101
101
type testCase struct {
102
- in string
103
- exOut string
104
- exOk bool
105
- comment string
102
+ in string
103
+ exOut string
104
+ exOk bool
106
105
}
107
106
testCases := []testCase {
108
107
{
@@ -121,22 +120,22 @@ func Test_trimK8sPreamble(t *testing.T) {
121
120
exOk : false ,
122
121
},
123
122
{
124
- in : "junk {BLAH} blah" ,
125
- exOut : "junk {BLAH} blah" ,
126
- exOk : false ,
127
- comment : " we ignore the {} where it just exists within the string, as it doesnt look like a valid json log line" ,
123
+ in : "junk {BLAH} blah" ,
124
+ exOut : "junk {BLAH} blah" ,
125
+ exOk : false ,
126
+ // we ignore the {} where it just exists within the string, as it doesnt look like a valid json log line
128
127
},
129
128
{
130
- in : "junk {BLAH}" ,
131
- exOut : "{BLAH}" ,
132
- exOk : true ,
133
- comment : " where there is some preamble before a json like string, we trim the preamble." ,
129
+ in : "junk {BLAH}" ,
130
+ exOut : "{BLAH}" ,
131
+ exOk : true ,
132
+ // where there is some preamble before a json like string, we trim the preamble.
134
133
},
135
134
{
136
- in : "junk {} something else" ,
137
- exOut : "junk {} something else" ,
138
- exOk : false ,
139
- comment : " we ignore the {} where it just exists within the string, as it doesnt look like a valid json log line" ,
135
+ in : "junk {} something else" ,
136
+ exOut : "junk {} something else" ,
137
+ exOk : false ,
138
+ // we ignore the {} where it just exists within the string, as it doesnt look like a valid json log line
140
139
},
141
140
}
142
141
for _ , tc := range testCases {
0 commit comments