Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigPath ¶
func DefaultConfigPath() string
DefaultConfigPath returns ~/.allegro/config.json.
func ResolveWithConfig ¶
ResolveWithConfig implements the 4-tier precedence: flag > env > config > default. For int values: 0 means "not set" for flag and config tiers.
func WriteConfig ¶
WriteConfig writes config to the given path, creating parent dirs.
Types ¶
type Config ¶
type Config struct {
StorePath string `json:"store_path,omitempty"`
Workers int `json:"workers,omitempty"`
LinkStrategy string `json:"link_strategy,omitempty"`
NoProgress bool `json:"no_progress"`
NoColor bool `json:"no_color"`
ComposerPath string `json:"composer_path,omitempty"`
NoDev bool `json:"no_dev"`
NoScripts bool `json:"no_scripts"`
PruneStaleDay int `json:"prune_stale_days,omitempty"`
}
Config represents ~/.allegro/config.json. Config represents ~/.allegro/config.json.
func ReadConfig ¶
ReadConfig reads the config file. Returns zero-value Config if missing or malformed.
Click to show internal directories.
Click to hide internal directories.