File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ func main() {
37
37
logger .Infof ("Hello" )
38
38
logger .Warnf ("World" )
39
39
40
- fmt .Fprintf (w , "OK\n " )
40
+ _ , _ = fmt .Fprintf (w , "OK\n " )
41
41
})
42
42
43
43
// Run server
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ func main() {
21
21
logger .Infof ("Hello" )
22
22
logger .Warnf ("World" )
23
23
24
- fmt .Fprintf (w , "OK\n " )
24
+ _ , _ = fmt .Fprintf (w , "OK\n " )
25
25
})
26
26
27
27
projectId := "my-gcp-project"
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ func TestIntegration(t *testing.T) {
26
26
logger .Warnf ("3" )
27
27
logger .Errorf ("4" )
28
28
29
- fmt .Fprintf (w , "OK\n " )
29
+ _ , _ = fmt .Fprintf (w , "OK\n " )
30
30
})
31
31
32
32
requestLogOut := new (bytes.Buffer )
@@ -84,7 +84,7 @@ func TestIntegration(t *testing.T) {
84
84
}
85
85
86
86
// check context log
87
- logs := strings .Split (string ( contextLogOut .Bytes () ), "\n " )
87
+ logs := strings .Split (contextLogOut .String ( ), "\n " )
88
88
logs = logs [:len (logs )- 1 ]
89
89
logExpected := []struct {
90
90
Severity string
@@ -128,7 +128,7 @@ func TestNoContextLog(t *testing.T) {
128
128
129
129
mux := http .NewServeMux ()
130
130
mux .HandleFunc ("/foo" , func (w http.ResponseWriter , r * http.Request ) {
131
- fmt .Fprintf (w , "OK\n " )
131
+ _ , _ = fmt .Fprintf (w , "OK\n " )
132
132
})
133
133
134
134
requestLogOut := new (bytes.Buffer )
@@ -174,6 +174,6 @@ func TestNoContextLog(t *testing.T) {
174
174
}
175
175
176
176
if len (contextLogOut .Bytes ()) != 0 {
177
- t .Errorf ("context log exists: %s" , string ( contextLogOut .Bytes () ))
177
+ t .Errorf ("context log exists: %s" , contextLogOut .String ( ))
178
178
}
179
179
}
You can’t perform that action at this time.
0 commit comments