MCPcopy Create free account
hub / github.com/kataras/iris / Deprecated

Method Deprecated

versioning/group.go:119–128  ·  view source on GitHub ↗

Deprecated marks this group and all its versioned routes as deprecated versions of that endpoint.

(options DeprecationOptions)

Source from the content-addressed store, hash-verified

117// Deprecated marks this group and all its versioned routes
118// as deprecated versions of that endpoint.
119func (g *Group) Deprecated(options DeprecationOptions) *Group {
120 // store it for future use, e.g. collect all deprecated APIs and notify the developer.
121 g.deprecation = options
122
123 g.API.UseOnce(func(ctx *context.Context) {
124 WriteDeprecated(ctx, options)
125 ctx.Next()
126 })
127 return g
128}
129
130func makeHandler(validate semver.Range) context.Handler {
131 return func(ctx *context.Context) {

Callers 1

TestNewGroupFunction · 0.80

Calls 3

WriteDeprecatedFunction · 0.85
NextMethod · 0.80
UseOnceMethod · 0.65

Tested by 1

TestNewGroupFunction · 0.64