(val interface{})
| 40 | } |
| 41 | |
| 42 | func (m *matcher) assign(val interface{}) { |
| 43 | valRefl := reflect.ValueOf(val) |
| 44 | // Convert untyped nil into typed nil. Otherwise it will panic. |
| 45 | if !valRefl.IsValid() { |
| 46 | valRefl = reflect.Zero(m.store.Type()) |
| 47 | } |
| 48 | |
| 49 | m.store.Set(valRefl) |
| 50 | } |
| 51 | |
| 52 | // Map structure implements reflection-based conversion between configuration |
| 53 | // directives and Go variables. |