Documentation ¶
Overview ¶
Package project provides functionality for retrieving Google Cloud project IDs and related configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ID ¶
ID retrieves the default Google Cloud project ID based on the provided options.
It uses the following order when searching:
- Common environment variables like GCP_PROJECT, GCLOUD_PROJECT, GOOGLE_CLOUD_PROJECT.
- The DefaultApplicationCredentials method from the golang.org/x/oauth2/google package.
- The default project configured in `gcloud` CLI.
If the project ID is empty and the Strict option is enabled, `ID()` panics.
Types ¶
Click to show internal directories.
Click to hide internal directories.