Documentation
¶
Overview ¶
Package defaults provides functionality for managing default values and configurations.
Index ¶
- func Load(path file.File, embeds config.Embedded, cfg config.Config) (tools.Defaults, error)
- type Defaults
- func (d *Defaults) Default(defaults []byte) error
- func (d *Defaults) FromFile(path string) error
- func (d *Defaults) Get() tools.Defaults
- func (d *Defaults) Load(path file.File, defaults []byte, isSet bool) error
- func (d *Defaults) Merge(cfg config.Config) error
- func (d *Defaults) Unmarshal(data []byte) error
- func (d *Defaults) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Defaults ¶
type Defaults struct {
// contains filtered or unexported fields
}
Defaults holds all the configuration options for godyl, including tool-specific defaults.
func (*Defaults) FromFile ¶
FromFile reads and parses a YAML file from the given path into the Defaults struct.
func (*Defaults) Load ¶
Load loads configuration defaults from a file or uses embedded defaults if not specified.
func (*Defaults) Merge ¶
Merge applies configuration overrides to the defaults.
TODO(Idelchi): This is not subcommand-agnostic.
Click to show internal directories.
Click to hide internal directories.