1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 02:17:05 +00:00

minor: versioning: Match: store the matched version and revert the last change

Former-commit-id: e7aa04671d3f54650bb194a97300b6a89e1b0d2b
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-06-20 09:39:42 +03:00
parent 3c86fa8010
commit 878484204e
6 changed files with 35 additions and 18 deletions

View File

@@ -429,9 +429,6 @@ type Context interface {
// See `GetLocale` too.
// Example: https://github.com/kataras/iris/tree/master/_examples/i18n
Tr(format string, args ...interface{}) string
// SetVersion force-sets the API Version integrated with the "iris/versioning" subpackage.
// It can be used inside a middleare.
SetVersion(constraint string)
// +------------------------------------------------------------+
// | Headers helpers |
// +------------------------------------------------------------+
@@ -2145,12 +2142,6 @@ func (ctx *context) Tr(format string, args ...interface{}) string { // other nam
return fmt.Sprintf(format, args...)
}
// SetVersion force-sets the API Version integrated with the "iris/versioning" subpackage.
// It can be used inside a middleare.
func (ctx *context) SetVersion(constraint string) {
ctx.values.Set(ctx.app.ConfigurationReadOnly().GetVersionContextKey(), constraint)
}
// +------------------------------------------------------------+
// | Response Headers helpers |
// +------------------------------------------------------------+