From 7d204d89c2138b476cb1babf85f6f6e1cce9b268 Mon Sep 17 00:00:00 2001 From: Mihai Parparita Date: Fri, 10 Feb 2023 15:40:28 -0800 Subject: [PATCH] ipn/ipnlocal: fix passthrough of formatting arguments in PeerAPI doctor output Followup to #7235, we were not treating the formatting arguments as variadic. This worked OK for single values, but stopped working when we started passing multiple values (noticed while trying out #7244). Signed-off-by: Mihai Parparita --- ipn/ipnlocal/peerapi.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipn/ipnlocal/peerapi.go b/ipn/ipnlocal/peerapi.go index e3e7401e7..e0f78ec85 100644 --- a/ipn/ipnlocal/peerapi.go +++ b/ipn/ipnlocal/peerapi.go @@ -832,7 +832,7 @@ func (h *peerAPIHandler) handleServeDoctor(w http.ResponseWriter, r *http.Reques fmt.Fprintln(w, "
")
 
 	h.ps.b.Doctor(r.Context(), func(format string, args ...any) {
-		line := fmt.Sprintf(format, args)
+		line := fmt.Sprintf(format, args...)
 		fmt.Fprintln(w, html.EscapeString(line))
 	})