MCPcopy Index your code
hub / github.com/coder/coder / TestSlogRemoteAddr

Function TestSlogRemoteAddr

tailnet/conn_test.go:524–529  ·  view source on GitHub ↗

TestSlogRemoteAddr tests that passing a nil net.Addr, as could be returned by conn.RemoteAddr(), does not cause a problem when passed to slog.F

(t *testing.T)

Source from the content-addressed store, hash-verified

522// TestSlogRemoteAddr tests that passing a nil net.Addr, as could be returned by conn.RemoteAddr(), does not cause a
523// problem when passed to slog.F
524func TestSlogRemoteAddr(t *testing.T) {
525 t.Parallel()
526 logger := testutil.Logger(t)
527 var a net.Addr
528 logger.Info(context.Background(), "this should not segfault", slog.F("addr", a))
529}

Callers

nothing calls this directly

Calls 2

LoggerFunction · 0.92
InfoMethod · 0.45

Tested by

no test coverage detected