diff --git a/util.go b/util.go index 671bfbe..fc0aa01 100644 --- a/util.go +++ b/util.go @@ -202,7 +202,7 @@ func marshalConfigWriter(f afero.File, c map[string]interface{}, configType stri 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.ReadFrom(in) diff --git a/viper.go b/viper.go index 3dd4eb2..e0f7fc7 100644 --- a/viper.go +++ b/viper.go @@ -1351,14 +1351,14 @@ func (v *Viper) WatchRemoteConfigOnChannel() error { return v.watchKeyValueConfigOnChannel() } -// Unmarshall a Reader into a map. +// Unmarshal a Reader into a map. // Should probably be an unexported function. func unmarshalReader(in io.Reader, c map[string]interface{}) error { return v.unmarshalReader(in, c) } 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. diff --git a/viper_test.go b/viper_test.go index 774ca11..ed53272 100644 --- a/viper_test.go +++ b/viper_test.go @@ -262,7 +262,7 @@ func TestDefault(t *testing.T) { assert.Equal(t, "leather", Get("clothing.jacket")) } -func TestUnmarshalling(t *testing.T) { +func TestUnmarshaling(t *testing.T) { SetConfigType("yaml") r := bytes.NewReader(yamlExample)