Documentation
¶
Overview ¶
Package config resolves runtime configuration for the sectors CLI.
Precedence (highest first):
- an explicit value passed on the command line (--api-key / --base-url)
- environment variables (SECTORS_API_KEY / SECTORS_BASE_URL)
- the config file at <user-config-dir>/sectors/config.yaml
The config file is intentionally tiny YAML so `sectors auth login` can write it and humans can hand-edit it.
Index ¶
Constants ¶
View Source
const ( EnvAPIKey = "SECTORS_API_KEY" EnvBaseURL = "SECTORS_BASE_URL" )
Variables ¶
This section is empty.
Functions ¶
func ResolveAPIKey ¶
ResolveAPIKey applies the precedence rules for the API key. flagVal is the value of --api-key ("" if unset).
func ResolveBaseURL ¶
ResolveBaseURL applies precedence for the base URL, returning "" if none is configured (the client then uses its built-in default).
Types ¶
Click to show internal directories.
Click to hide internal directories.