mirror of
https://github.com/kataras/iris.git
synced 2026-01-10 05:25:58 +00:00
partial cleanup of the macro pkg and move it from /core/router to the root because it may be used by the end-developers now to ammend the available macros per application
Former-commit-id: 951a5e7a401af25ecaa904ff6463b0def2c87afb
This commit is contained in:
@@ -15,6 +15,11 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
// ValueSetter is the interface which can be accepted as a generic solution of RequestParams or memstore when Set is the only requirement,
|
||||
// i.e internally on macro/template/TemplateParam#Eval:paramChanger.
|
||||
ValueSetter interface {
|
||||
Set(key string, newValue interface{}) (Entry, bool)
|
||||
}
|
||||
// Entry is the entry of the context storage Store - .Values()
|
||||
Entry struct {
|
||||
Key string
|
||||
@@ -26,6 +31,8 @@ type (
|
||||
Store []Entry
|
||||
)
|
||||
|
||||
var _ ValueSetter = (*Store)(nil)
|
||||
|
||||
// GetByKindOrNil will try to get this entry's value of "k" kind,
|
||||
// if value is not that kind it will NOT try to convert it the "k", instead
|
||||
// it will return nil, except if boolean; then it will return false
|
||||
|
||||
Reference in New Issue
Block a user