Discover Packages
github.com/crossplane/cli/v2
internal
config
package
Version:
v2.3.1
Opens a new window with list of versions in this module.
Published: May 25, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package config implements loading the crossplane CLI config file.
ResolvePath returns the path to the config file, in priority order:
flag - the value of the --config flag, if any.
The CROSSPLANE_CONFIG environment variable.
DefaultPath() (XDG/HOME-derived).
An empty string is returned only if no source produces one.
Save writes cfg as YAML to path. It creates parent directories with mode
0o755 and writes the file with mode 0o600. An empty path is an error.
type Config struct {
Version int `json:"version"`
Features Features `json:"features,omitzero"`
}
Config is the on-disk configuration for the crossplane CLI.
Load reads a Config from path. A missing file is not an error; the zero
Config is returned. Unknown fields in the file are an error so typos in
flag names surface immediately.
type Features struct {
EnableAlpha bool `json:"enableAlpha,omitempty"`
DisableBeta bool `json:"disableBeta,omitempty"`
}
Features configures feature visibility.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.