cueenv

package
v1.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package cueenv builds the environment slice a cue/load or mod/modconfig call consults when the caller wants to override CUE_REGISTRY or CUE_CACHE_DIR for that one operation.

The override is a fresh copy of the process environment with the chosen variables replaced or appended; the process environment itself is never written (no os.Setenv), so a long-running consumer can run overlapping loads with different registries. When nothing is overridden the result is nil, which both load.Config.Env and modconfig.Config.Env document as "use the process environment", so the SDK reads it exactly as it would without the kernel in between.

This package is under opm/internal/ so every package under opm/ that touches cue/load (the file and registry loaders, the schema loader and the render stage) shares one implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Override

func Override(registry, cacheDir string) []string

Override returns nil when both registry and cacheDir are empty, and otherwise a copy of os.Environ() in which each non-empty argument replaces the existing CUE_REGISTRY / CUE_CACHE_DIR entry or is appended when the variable is not set. An empty argument leaves its variable as the process has it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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