Remove remnants of config loading in credentials routine

main
Mari 4 years ago
parent a2a415b2b3
commit 137fcc02f1
  1. 4
      main.go

@ -40,11 +40,9 @@ func (c *TokenCache) Credentials() (*google.Credentials, error) {
return nil, fmt.Errorf("could not read credentials: %v", err) return nil, fmt.Errorf("could not read credentials: %v", err)
} }
c.CredentialData, err = google.CredentialsFromJSON(context.Background(), data, c.CredentialScopes...) c.CredentialData, err = google.CredentialsFromJSON(context.Background(), data, c.CredentialScopes...)
err = json.NewDecoder(f).Decode(&c.ConfigData)
if err != nil { if err != nil {
return nil, fmt.Errorf("could not decode config: %v", err) return nil, fmt.Errorf("could not decode credentials: %v", err)
} }
c.configLoaded = true
} }
return c.CredentialData, nil return c.CredentialData, nil
} }

Loading…
Cancel
Save