-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(internal/detect): add helper to detect projectID from env #4582
Conversation
cc @crwilcox Some of your libraries can use this in the future. I think you brought this up not too long ago... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but is there a way to add a test?
How does this differ from https://github.com/googleapis/google-cloud-go/blob/master/firestore/client.go#L83 / https://github.com/googleapis/google-cloud-go/blob/master/firestore/client.go#L104 Is the goal here to centralize this as most veneers have this (more or less) duplicated code? |
Yes. Just wanted to have a consistent implementation for all to use. |
@noahdietz Done. |
This is meant to be used by certain veneers so that we can detect the projectID in a consistent manner. Future PRs will use this logic.
Fixes: #1294