Documentation
¶
Overview ¶
Package config loads the on-disk Pyrycode configuration file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
RelayURL string `json:"relay_url"`
}
Config is the on-disk schema for ~/.pyry/config.json. Fields are added additively over time; consumers reading an older file see missing-field defaults via DefaultConfig + overlay-decode in Load.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns the built-in defaults. Used directly when no config file exists, and as the overlay base when a partial file is present so absent fields keep their default values.
func Load ¶
Load reads the config file at path and returns a Config with defaults filled in for absent fields. A missing file returns DefaultConfig() with no error. A malformed file returns a wrapped error (no silent fallback — operator must fix or remove the file). On any error the returned Config is the zero value; callers must check err.