@@ -44,20 +44,20 @@ func Load(schema Schema, values map[string]string) (Map, error) {
44
44
func (m * Map ) Change (changes map [string ]string ) (map [string ]string , error ) {
45
45
values := make (map [string ]string , len (m .schema ))
46
46
47
- errors := & ErrorList {}
47
+ errList := & ErrorList {}
48
48
for name , change := range changes {
49
49
// Ensure that we were actually passed a string.
50
50
s := reflect .ValueOf (change )
51
51
if s .Kind () != reflect .String {
52
- errors .add (name , nil , fmt .Sprintf ("invalid type %s" , s .Kind ()))
52
+ errList .add (name , nil , fmt .Sprintf ("invalid type %s" , s .Kind ()))
53
53
continue
54
54
}
55
55
56
56
values [name ] = change
57
57
}
58
58
59
- if errors .Len () > 0 {
60
- return nil , errors
59
+ if errList .Len () > 0 {
60
+ return nil , errList
61
61
}
62
62
63
63
// Any key not explicitly set, is considered unset.
@@ -174,12 +174,12 @@ func (m *Map) update(values map[string]string) ([]string, error) {
174
174
175
175
// Update our keys with the values from the given map, and keep track
176
176
// of which keys actually changed their value.
177
- errors := & ErrorList {}
177
+ errList := & ErrorList {}
178
178
names := []string {}
179
179
for name , value := range values {
180
180
changed , err := m .set (name , value , initial )
181
181
if err != nil {
182
- errors .add (name , value , err .Error ())
182
+ errList .add (name , value , err .Error ())
183
183
continue
184
184
}
185
185
@@ -190,9 +190,9 @@ func (m *Map) update(values map[string]string) ([]string, error) {
190
190
sort .Strings (names )
191
191
192
192
var err error
193
- if errors .Len () > 0 {
194
- errors .sort ()
195
- err = errors
193
+ if errList .Len () > 0 {
194
+ errList .sort ()
195
+ err = errList
196
196
}
197
197
198
198
return names , err
0 commit comments