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 <mihai@tailscale.com>
pull/7253/head
Mihai Parparita 2 years ago committed by Mihai Parparita
parent 9ad36d17a3
commit 7d204d89c2

@ -832,7 +832,7 @@ func (h *peerAPIHandler) handleServeDoctor(w http.ResponseWriter, r *http.Reques
fmt.Fprintln(w, "<pre>")
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))
})

Loading…
Cancel
Save