From 1c53496d5be8e72f0cfed17be5c06e2249598fca Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 12 Oct 2026 20:04:52 +0200 Subject: [PATCH] fix sprintfQuotedString (gocritic) Signed-off-by: Sebastiaan van Stijn --- daemon/libnetwork/diagnostic/types.go | 2 +- pkg/plugins/pluginrpc-gen/parser_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/libnetwork/diagnostic/types.go b/daemon/libnetwork/diagnostic/types.go index ef1d7f7192..2be8441610 100644 --- a/daemon/libnetwork/diagnostic/types.go +++ b/daemon/libnetwork/diagnostic/types.go @@ -111,7 +111,7 @@ type TableEntryObj struct { } func (t *TableEntryObj) String() string { - return fmt.Sprintf("%d) k:`%s` -> v:`%s` owner:`%s`\n", t.Index, t.Key, t.Value, t.Owner) + return fmt.Sprintf("%d) k:%#q -> v:%#q owner:%#q\n", t.Index, t.Key, t.Value, t.Owner) } // TableEndpointsResult fully typed message for proper unmarshaling on the client side diff --git a/pkg/plugins/pluginrpc-gen/parser_test.go b/pkg/plugins/pluginrpc-gen/parser_test.go index bf16ddb358..0838b6343a 100644 --- a/pkg/plugins/pluginrpc-gen/parser_test.go +++ b/pkg/plugins/pluginrpc-gen/parser_test.go @@ -248,7 +248,7 @@ func TestParseWithMultilineAnnotation(t *testing.T) { func assertName(t *testing.T, expected, actual string) { if expected != actual { - fatalOut(t, fmt.Sprintf("expected name to be `%s`, got: %s", expected, actual)) + fatalOut(t, fmt.Sprintf("expected name to be %#q, got: %s", expected, actual)) } }