MCPcopy
hub / github.com/tailscale/tailscale / KV

Method KV

tsweb/debug.go:137–142  ·  view source on GitHub ↗

KV adds a key/value list item to /debug/.

(k string, v any)

Source from the content-addressed store, hash-verified

135
136// KV adds a key/value list item to /debug/.
137func (d *DebugHandler) KV(k string, v any) {
138 val := html.EscapeString(fmt.Sprintf("%v", v))
139 d.kvs = append(d.kvs, func(w io.Writer) {
140 fmt.Fprintf(w, "<li><b>%s:</b> %s</li>", k, val)
141 })
142}
143
144// KVFunc adds a key/value list item to /debug/. v is called on every
145// render of /debug/.

Callers 6

DebuggerFunction · 0.95
TestDebuggerKVFunction · 0.80
ExampleDebugHandler_KVFunction · 0.80
mainFunction · 0.80
muxFunction · 0.80

Calls

no outgoing calls

Tested by 3

TestDebuggerKVFunction · 0.64
ExampleDebugHandler_KVFunction · 0.64