utils

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProjectID

func GetProjectID(ctx context.Context) (string, error)

GetProjectID attempts to determine the GCP project ID from the environment. It checks in the following order: 1. Environment variables (GOOGLE_CLOUD_PROJECT, GCLOUD_PROJECT) 2. Application Default Credentials (ADC) 3. GCP metadata server (if running on GCP) Returns an error if no project ID could be determined.

func IsZero

func IsZero[T comparable](v T) bool

func ToPtr

func ToPtr[T comparable](v T) *T

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL