clientconfig

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

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

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

func WriteDefault(path string) (bool, error)

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.

Jump to

Keyboard shortcuts

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