Merge pull request #1038 from harshavardhana/shadow

server: Fix shadowing bug reported by go vet on go1.6beta2
This commit is contained in:
Anand Babu (AB) Periasamy 2016-01-18 20:56:42 -08:00
commit 9cb590d800
1 changed files with 2 additions and 2 deletions

View File

@ -202,12 +202,12 @@ func getConfig() (*configV2, *probe.Error) {
if err != nil {
if os.IsNotExist(err.ToGoError()) {
// Initialize new config, since config file doesn't exist yet
config := &configV2{}
config = &configV2{}
config.Version = "2"
config.Credentials.AccessKeyID = string(mustGenerateAccessKeyID())
config.Credentials.SecretAccessKey = string(mustGenerateSecretAccessKey())
config.Credentials.Region = "us-east-1"
if err := saveConfig(config); err != nil {
if err = saveConfig(config); err != nil {
return nil, err.Trace()
}
return config, nil