Load creates a new configuration Map with the given schema and initial values. It is meant to be called with a set of initial values that were set at a previous time and persisted to some storage like a database. If one or more keys fail to be loaded, return an ErrorList describing what went wrong.
(schema Schema, values map[string]string)
| 28 | // If one or more keys fail to be loaded, return an ErrorList describing what |
| 29 | // went wrong. Non-failing keys are still loaded in the returned Map. |
| 30 | func Load(schema Schema, values map[string]string) (Map, error) { |
| 31 | m := Map{ |
| 32 | schema: schema, |
| 33 | } |
| 34 | |
| 35 | // Populate the initial values. |
| 36 | _, err := m.update(values) |
| 37 | return m, err |
| 38 | } |
| 39 | |
| 40 | // Change the values of this configuration Map. |
| 41 | // |
searching dependent graphs…