mirror of
https://github.com/spf13/viper.git
synced 2024-12-26 14:01:14 -07:00
Fix deadcode
This commit is contained in:
parent
7b5adba788
commit
29bb3ee94f
@ -11,8 +11,6 @@ linters:
|
||||
- maligned
|
||||
|
||||
# TODO: fix me
|
||||
- deadcode
|
||||
- unused
|
||||
- wsl
|
||||
- golint
|
||||
- stylecheck
|
||||
|
4
viper.go
4
viper.go
@ -1368,7 +1368,6 @@ func (v *Viper) SafeWriteConfigAs(filename string) error {
|
||||
return v.writeConfig(filename, false)
|
||||
}
|
||||
|
||||
func writeConfig(filename string, force bool) error { return v.writeConfig(filename, force) }
|
||||
func (v *Viper) writeConfig(filename string, force bool) error {
|
||||
jww.INFO.Println("Attempting to write configuration to file.")
|
||||
ext := filepath.Ext(filename)
|
||||
@ -1486,9 +1485,6 @@ func (v *Viper) unmarshalReader(in io.Reader, c map[string]interface{}) error {
|
||||
}
|
||||
|
||||
// Marshal a map into Writer.
|
||||
func marshalWriter(f afero.File, configType string) error {
|
||||
return v.marshalWriter(f, configType)
|
||||
}
|
||||
func (v *Viper) marshalWriter(f afero.File, configType string) error {
|
||||
c := v.AllSettings()
|
||||
switch configType {
|
||||
|
Loading…
Reference in New Issue
Block a user