[vulndb] client: change fmt.Fprint to fmt.Print in client_test.go

117 views
Skip to first unread message

Julie Qiu (Gerrit)

unread,
Oct 15, 2021, 5:32:55 PM10/15/21
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Roland Shoemaker, Dominik Honnef, Go Bot, golang-co...@googlegroups.com

Julie Qiu submitted this change.

View Change


Approvals: Dominik Honnef: Looks good to me, approved Julie Qiu: Trusted; Run TryBots Go Bot: TryBots succeeded
client: change fmt.Fprint to fmt.Print in client_test.go

Running staticcheck noted these errors, which are fixed.

client/client_test.go:37:2: printf-style function with dynamic format
string and no further arguments should use print-style function instead
(SA1006)

client/client_test.go:41:2: printf-style function with dynamic format
string and no further arguments should use print-style function instead
(SA1006)

Change-Id: I43d4f03788f1188a98cff895670406b259da302a
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/356171
Trust: Julie Qiu <ju...@golang.org>
Run-TryBot: Julie Qiu <ju...@golang.org>
TryBot-Result: Go Bot <go...@golang.org>
Reviewed-by: Dominik Honnef <dom...@honnef.co>
---
M client/client_test.go
1 file changed, 26 insertions(+), 2 deletions(-)

diff --git a/client/client_test.go b/client/client_test.go
index 309982b..09adda1 100644
--- a/client/client_test.go
+++ b/client/client_test.go
@@ -34,11 +34,11 @@
}`

func serveTestVuln(w http.ResponseWriter, req *http.Request) {
- fmt.Fprintf(w, testVuln)
+ fmt.Fprint(w, testVuln)
}

func serveIndex(w http.ResponseWriter, req *http.Request) {
- fmt.Fprintf(w, index)
+ fmt.Fprint(w, index)
}

// testCache for testing purposes

To view, visit change 356171. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: vulndb
Gerrit-Branch: master
Gerrit-Change-Id: I43d4f03788f1188a98cff895670406b259da302a
Gerrit-Change-Number: 356171
Gerrit-PatchSet: 3
Gerrit-Owner: Julie Qiu <ju...@golang.org>
Gerrit-Reviewer: Dominik Honnef <dom...@honnef.co>
Gerrit-Reviewer: Go Bot <go...@golang.org>
Gerrit-Reviewer: Julie Qiu <ju...@golang.org>
Gerrit-Reviewer: Roland Shoemaker <brac...@google.com>
Gerrit-MessageType: merged
Reply all
Reply to author
Forward
0 new messages