MCPcopy Index your code
hub / github.com/foxcpp/maddy / assign

Method assign

framework/config/map.go:42–50  ·  view source on GitHub ↗
(val interface{})

Source from the content-addressed store, hash-verified

40}
41
42func (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.

Callers 1

ProcessWithMethod · 0.80

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected