commit | 78c53a344c51d76fbb95da6c2f13d36715f558fa | [log] [tgz] |
---|---|---|
author | Cody Oss <6331106+codyoss@users.noreply.github.com> | Wed May 15 16:42:17 2024 -0500 |
committer | GitHub <noreply@github.com> | Wed May 15 21:42:17 2024 +0000 |
tree | f2d0103046162c24d516f4265e6aafbed923d9d5 | |
parent | 75e8fd0d6935487bc8c1cadc45620ea29a7fd8b1 [diff] |
test: fix presubmit script to handle dirs (#10185) It seems #10064 changed the semantics from files to dirs for significant changes. This caused `CHANGED_DIRS` to fail when the grep test was done as sometimes there is no slash now. This piping was not actually needed though and the cut should work even if the character is not there. This failure to grep caused presubmits to run for whole repo sometimes when changes were only made in one sub-module.
Go packages for Google Cloud Platform services.
import "cloud.google.com/go"
To install the packages on your system, do not clone the repo. Instead:
cd /my/cloud/project
go get
the package(s) you want to use:go get cloud.google.com/go/firestore # Replace with the package you want to use.
NOTE: Some of these packages are under development, and may occasionally make backwards-incompatible changes.
For an updated list of all of our released APIs please see our reference docs.
Our libraries are compatible with at least the three most recent, major Go releases. They are currently compatible with:
By default, each API will use Google Application Default Credentials for authorization credentials used in calling the API endpoints. This will allow your application to run in many environments without requiring explicit configuration.
client, err := storage.NewClient(ctx)
To authorize using a JSON key file, pass option.WithCredentialsFile
to the NewClient
function of the desired package. For example:
client, err := storage.NewClient(ctx, option.WithCredentialsFile("path/to/keyfile.json"))
You can exert more control over authorization by using the golang.org/x/oauth2
package to create an oauth2.TokenSource
. Then pass option.WithTokenSource
to the NewClient
function:
tokenSource := ...
client, err := storage.NewClient(ctx, option.WithTokenSource(tokenSource))
Contributions are welcome. Please, see the CONTRIBUTING document for details.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See Contributor Code of Conduct for more information.