MCPcopy Create free account
hub / github.com/DoNewsCode/core / TestMapAdapter_Unmarshal

Function TestMapAdapter_Unmarshal

config/config_test.go:171–186  ·  view source on GitHub ↗
(t *gotesting.T)

Source from the content-addressed store, hash-verified

169}
170
171func TestMapAdapter_Unmarshal(t *gotesting.T) {
172 t.Parallel()
173 m := MapAdapter(
174 map[string]interface{}{
175 "foo": map[string]interface{}{
176 "bar": "baz",
177 },
178 },
179 )
180 var target map[string]interface{}
181 err := m.Unmarshal("foo", &target)
182 assert.NoError(t, err)
183 assert.Equal(t, map[string]interface{}{
184 "bar": "baz",
185 }, target)
186}
187
188func TestKoanfAdapter_Reload(t *gotesting.T) {
189 t.Parallel()

Callers

nothing calls this directly

Calls 2

MapAdapterTypeAlias · 0.85
UnmarshalMethod · 0.65

Tested by

no test coverage detected