mirror of
https://github.com/spf13/viper
synced 2025-05-06 20:27:17 +00:00
Make marshal spelling consistent throughout
This commit is contained in:
parent
5b296abffb
commit
315278c264
3 changed files with 4 additions and 4 deletions
2
util.go
2
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)
|
||||
|
||||
|
|
4
viper.go
4
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.
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue