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

Method With

gin.go:348–354  ·  gin.go::Engine.With

With returns an Engine with the configuration set in the OptionFunc.

(opts ...OptionFunc)

Source from the content-addressed store, hash-verified

346
347// With returns an Engine with the configuration set in the OptionFunc.
348func (engine *Engine) With(opts ...OptionFunc) *Engine {
349 for _, opt := range opts {
350 opt(engine)
351 }
352
353 return engine
354}
355
356func (engine *Engine) rebuild404Handlers() {
357 engine.allNoRoute = engine.combineHandlers(engine.noRoute)

Callers 3

NewFunction · 0.95
DefaultFunction · 0.80
TestWithOptionFuncFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestWithOptionFuncFunction · 0.64