env

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package env resolves filesystem paths from environment variables, keeping environment lookups out of business logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GcloudRoot

func GcloudRoot() (string, error)

GcloudRoot resolves the gcloud config root: $CLOUDSDK_CONFIG, else ~/.config/gcloud (gcloud hardcodes ~/.config, ignoring XDG_CONFIG_HOME).

func KubeAuthCachePath added in v0.1.1

func KubeAuthCachePath() (string, error)

KubeAuthCachePath resolves the gke-gcloud-auth-plugin token cache: $KUBECACHEDIR (falling back to ~/.kube)/gke_gcloud_auth_plugin_cache. The plugin serves this cached token until expiry regardless of the active gcloud account, so switching configurations must invalidate it.

func PreviousStatePath

func PreviousStatePath() (string, error)

PreviousStatePath resolves gctx's state file recording the previously active configuration: <$XDG_CONFIG_HOME|~/.config>/gcloud-switch/previous.

Types

This section is empty.

Jump to

Keyboard shortcuts

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