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>
This commit is contained in:
Mihai Parparita 2023-02-10 15:40:28 -08:00 committed by Mihai Parparita
parent 9ad36d17a3
commit 7d204d89c2
1 changed files with 1 additions and 1 deletions

View File

@ -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))
})