diff options
author | Anton Evangelatov <anton.evangelatov@gmail.com> | 2018-08-09 17:37:00 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-08-09 17:37:00 +0800 |
commit | 7b5c3758250ffc78c7a5ce14c1b736a38d548423 (patch) | |
tree | 23a3b2785335beb846fd0e772c5ee9634f1347bb | |
parent | beade042d10df140100c2645fde922cf2c455ef6 (diff) | |
download | dexon-7b5c3758250ffc78c7a5ce14c1b736a38d548423.tar.gz dexon-7b5c3758250ffc78c7a5ce14c1b736a38d548423.tar.zst dexon-7b5c3758250ffc78c7a5ce14c1b736a38d548423.zip |
cmd/swarm: remove shadow err (#17360)
-rw-r--r-- | cmd/swarm/config.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/swarm/config.go b/cmd/swarm/config.go index ff085fd94..cda8c41c3 100644 --- a/cmd/swarm/config.go +++ b/cmd/swarm/config.go @@ -132,7 +132,7 @@ func initSwarmNode(config *bzzapi.Config, stack *node.Node, ctx *cli.Context) { log.Debug(printConfig(config)) } -//override the current config with whatever is in the config file, if a config file has been provided +//configFileOverride overrides the current config with the config file, if a config file has been provided func configFileOverride(config *bzzapi.Config, ctx *cli.Context) (*bzzapi.Config, error) { var err error @@ -142,7 +142,8 @@ func configFileOverride(config *bzzapi.Config, ctx *cli.Context) (*bzzapi.Config if filepath = ctx.GlobalString(SwarmTomlConfigPathFlag.Name); filepath == "" { utils.Fatalf("Config file flag provided with invalid file path") } - f, err := os.Open(filepath) + var f *os.File + f, err = os.Open(filepath) if err != nil { return nil, err } |