Support for adding bindings to the Context.
This is very useful for hooks to pre-construct objects that can be used by all subsequent downstream commands, for example.
This commit is contained in:
@@ -23,6 +23,12 @@ func (b bindings) clone() bindings {
|
||||
return out
|
||||
}
|
||||
|
||||
func (b bindings) merge(other bindings) {
|
||||
for k, v := range other {
|
||||
b[k] = v
|
||||
}
|
||||
}
|
||||
|
||||
func getMethod(value reflect.Value, name string) reflect.Value {
|
||||
method := value.MethodByName(name)
|
||||
if !method.IsValid() {
|
||||
|
||||
Reference in New Issue
Block a user