aboutsummaryrefslogtreecommitdiff
path: root/expvarhandler
diff options
context:
space:
mode:
authorGravatar Erik Dubbelboer <erik@dubbelboer.com> 2022-04-01 18:11:16 +0200
committerGravatar GitHub <noreply@github.com> 2022-04-01 18:11:16 +0200
commit7a5afddf5b805a022f8e81281c772c11600da2f4 (patch)
tree76ecbf4981921328d823eb925e57f874f52c34f2 /expvarhandler
parentsupport adding/removing clients from LBClient (#1243) (diff)
downloadfasthttp-7a5afddf5b805a022f8e81281c772c11600da2f4.tar.gz
fasthttp-7a5afddf5b805a022f8e81281c772c11600da2f4.tar.bz2
fasthttp-7a5afddf5b805a022f8e81281c772c11600da2f4.zip
Use %v for errors and %q for strings (#1262)v1.35.0
Mostly in tests.
Diffstat (limited to 'expvarhandler')
-rw-r--r--expvarhandler/expvar.go2
-rw-r--r--expvarhandler/expvar_test.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/expvarhandler/expvar.go b/expvarhandler/expvar.go
index 84b8614..d9e17bf 100644
--- a/expvarhandler/expvar.go
+++ b/expvarhandler/expvar.go
@@ -30,7 +30,7 @@ func ExpvarHandler(ctx *fasthttp.RequestCtx) {
r, err := getExpvarRegexp(ctx)
if err != nil {
expvarRegexpErrors.Add(1)
- fmt.Fprintf(ctx, "Error when obtaining expvar regexp: %s", err)
+ fmt.Fprintf(ctx, "Error when obtaining expvar regexp: %v", err)
ctx.SetStatusCode(fasthttp.StatusBadRequest)
return
}
diff --git a/expvarhandler/expvar_test.go b/expvarhandler/expvar_test.go
index 550a65e..6f9f286 100644
--- a/expvarhandler/expvar_test.go
+++ b/expvarhandler/expvar_test.go
@@ -26,7 +26,7 @@ func TestExpvarHandlerBasic(t *testing.T) {
var m map[string]interface{}
if err := json.Unmarshal(body, &m); err != nil {
- t.Fatalf("unexpected error: %s", err)
+ t.Fatalf("unexpected error: %v", err)
}
if _, ok := m["cmdline"]; !ok {