Documentation
¶
Overview ¶
Package clientconfig loads a kuke ClientConfiguration document from disk. Used by `kuke --configuration` to feed defaults into viper before any subcommand runs. An absent file returns a zero-value document so the caller can fall back to its existing defaults without an error.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Load ¶
func Load(path string) (*v1beta1.ClientConfigurationDoc, error)
Load reads path and returns the parsed ClientConfiguration. When the file does not exist, returns a zero-value document and no error — the absent case is normal (callers fall back to hardcoded defaults). Any other read or parse failure is wrapped with errdefs.ErrClientConfigurationInvalid.
func WriteDefault ¶
WriteDefault writes the commented default ClientConfiguration to path when the file is absent. Returns true only when this call created the file; an existing file (any contents) is left untouched, satisfying the "first-write only" rule. Creates the parent directory if missing. Any other failure is returned wrapped.
Types ¶
This section is empty.