Documentation
¶
Overview ¶
Package config loads optional persistent defaults from a TOML file and merges them with CHROME_CDP_* environment variables into the effective global-flag defaults. Precedence, highest first: explicit flags > env > config file > built-in defaults. Cobra applies the flags; this package resolves the env > config > built-in portion and hands the result to the command tree.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Defaults ¶
type Defaults struct {
Timeout time.Duration
By string
Wait string
Target string
Port int
ProfileDir string
NoLaunch bool
NoDaemon bool
JSON bool
NoColor bool
}
Defaults are the effective global-flag defaults after the config file and CHROME_CDP_* env are merged over the built-in values.
func Builtin ¶
func Builtin() Defaults
Builtin returns the hard-coded defaults used when neither the config file nor the environment sets a value.
func FromEnv ¶
func FromEnv() Defaults
FromEnv returns the built-in defaults overlaid with CHROME_CDP_* env vars only (no config file). The daemon subprocess uses it: the parent already folded the config file into the environment it hands down, so parsing stays in one place.