Make marshal spelling consistent throughout

This commit is contained in:
Herkermer Sherwood 2016-12-09 06:14:40 -08:00
parent 5b296abffb
commit 315278c264
3 changed files with 4 additions and 4 deletions

View file

@ -202,7 +202,7 @@ func marshalConfigWriter(f afero.File, c map[string]interface{}, configType stri
return nil return nil
} }
func unmarshallConfigReader(in io.Reader, c map[string]interface{}, configType string) error { func unmarshalConfigReader(in io.Reader, c map[string]interface{}, configType string) error {
buf := new(bytes.Buffer) buf := new(bytes.Buffer)
buf.ReadFrom(in) buf.ReadFrom(in)

View file

@ -1351,14 +1351,14 @@ func (v *Viper) WatchRemoteConfigOnChannel() error {
return v.watchKeyValueConfigOnChannel() return v.watchKeyValueConfigOnChannel()
} }
// Unmarshall a Reader into a map. // Unmarshal a Reader into a map.
// Should probably be an unexported function. // Should probably be an unexported function.
func unmarshalReader(in io.Reader, c map[string]interface{}) error { func unmarshalReader(in io.Reader, c map[string]interface{}) error {
return v.unmarshalReader(in, c) return v.unmarshalReader(in, c)
} }
func (v *Viper) unmarshalReader(in io.Reader, c map[string]interface{}) error { func (v *Viper) unmarshalReader(in io.Reader, c map[string]interface{}) error {
return unmarshallConfigReader(in, c, v.getConfigType()) return unmarshalConfigReader(in, c, v.getConfigType())
} }
// Marshal a map into Writer. // Marshal a map into Writer.

View file

@ -262,7 +262,7 @@ func TestDefault(t *testing.T) {
assert.Equal(t, "leather", Get("clothing.jacket")) assert.Equal(t, "leather", Get("clothing.jacket"))
} }
func TestUnmarshalling(t *testing.T) { func TestUnmarshaling(t *testing.T) {
SetConfigType("yaml") SetConfigType("yaml")
r := bytes.NewReader(yamlExample) r := bytes.NewReader(yamlExample)