MCPcopy
hub / github.com/gin-gonic/gin / TestLoggerWithConfigSkipQueryString

Function TestLoggerWithConfigSkipQueryString

logger_test.go:476–488  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

474}
475
476func TestLoggerWithConfigSkipQueryString(t *testing.T) {
477 buffer := new(strings.Builder)
478 router := New()
479 router.Use(LoggerWithConfig(LoggerConfig{
480 Output: buffer,
481 SkipQueryString: true,
482 }))
483 router.GET("/logged", func(c *Context) { c.Status(http.StatusOK) })
484
485 PerformRequest(router, "GET", "/logged?a=21")
486 assert.Contains(t, buffer.String(), "200")
487 assert.NotContains(t, buffer.String(), "a=21")
488}

Callers

nothing calls this directly

Calls 7

NewFunction · 0.85
LoggerWithConfigFunction · 0.85
PerformRequestFunction · 0.85
UseMethod · 0.65
GETMethod · 0.65
StatusMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected