Skip to content
This repository was archived by the owner on Sep 3, 2020. It is now read-only.

Use GOOGLE_API_CLIENT_ID and GOOGLE_API_CLIENT_SECRET#35

Open
ccmaymay wants to merge 4 commits intorakyll:masterfrom
ccmaymay:rakyll
Open

Use GOOGLE_API_CLIENT_ID and GOOGLE_API_CLIENT_SECRET#35
ccmaymay wants to merge 4 commits intorakyll:masterfrom
ccmaymay:rakyll

Conversation

@ccmaymay
Copy link

Hi rakyll,

Thanks for writing the drive tool---it's very nice. :) I changed Init() to read GOOGLE_API_CLIENT_ID and GOOGLE_API_CLIENT_SECRET, respectively, from the environment. If either is empty, an error is returned. This is minimalistic, and won't work for everyone, but if you like it feel free to merge. (This is also my first foray into go so it may not be very idiomatic!)

Chandler

README.md Outdated
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use these values if there are set. If not, fallback to the embedded credentials.


g.context.ClientId = os.Getenv(clientIDEnvKey)
g.context.ClientSecret = os.Getenv(clientSecretEnvKey)
if len(g.context.ClientId) == 0 || len(g.context.ClientSecret) == 0 {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

g.context.ClientID == "" || g.context.C

@rakyll rakyll changed the title Rakyll Use GOOGLE_API_CLIENT_ID and GOOGLE_API_CLIENT_SECRET Dec 4, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments