MCPcopy
hub / github.com/tailscale/tailscale / ExampleDebugHandler_Section

Function ExampleDebugHandler_Section

tsweb/debug_test.go:201–210  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

199}
200
201func ExampleDebugHandler_Section() {
202 mux := http.NewServeMux()
203 dbg := Debugger(mux)
204 // Adds a section to /debug/ that dumps the HTTP request of the
205 // visitor.
206 dbg.Section(func(w io.Writer, r *http.Request) {
207 io.WriteString(w, "<h3>Dump of your HTTP request</h3>")
208 fmt.Fprintf(w, "<code>%#v</code>", r)
209 })
210}
211
212func TestParseTrustedCIDRs(t *testing.T) {
213 tests := []struct {

Callers

nothing calls this directly

Calls 3

SectionMethod · 0.80
WriteStringMethod · 0.80
DebuggerFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…