SetVersion force-sets the API Version. It can be used inside a middleware. Example of how you can change the default behavior to extract a requested version (which is by headers) from a "version" url parameter instead: func(ctx iris.Context) { // &version=1 version := ctx.URLParamDefault("vers
(ctx *context.Context, constraint string)
| 196 | // |
| 197 | // See `GetVersion` too. |
| 198 | func SetVersion(ctx *context.Context, constraint string) { |
| 199 | ctx.Values().Set(ctx.Application().ConfigurationReadOnly().GetVersionContextKey(), constraint) |
| 200 | } |
| 201 | |
| 202 | // AliasMap is just a type alias of the standard map[string]string. |
| 203 | // Head over to the `Aliases` function below for more. |
searching dependent graphs…