Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
transport/grpc: Fix check of GOOGLE_CLOUD_ENABLE_DIRECT_PATH
When GOOGLE_CLOUD_ENABLE_DIRECT_PATH is empty and split is called a slice with a single empty string is then looped and matched with strings.Contains. This means that without that environment variable set every single endpoint is matched. Instead check to make sure the match isn't against an empty string first. Change-Id: I7382c7997098a9f77db44bc8e1fb10942caeaa61 Reviewed-on: https://code-review.googlesource.com/c/google-api-go-client/+/41670 Reviewed-by: Jean de Klerk <[email protected]>
- Loading branch information