Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultPath ¶ added in v0.5.0
DefaultPath returns the default config file path: ~/.config/ccpr/config.yaml.
Types ¶
type Config ¶
type Config struct {
Profile string `yaml:"profile"`
Region string `yaml:"region"`
RepoMappings map[string]string `yaml:"repoMappings"`
}
Config holds application configuration loaded from file.
func Load ¶
Load searches for a configuration file and returns the parsed Config along with the resolved file path. Search order:
- explicit path (if non-empty)
- .ccpr.yaml in current directory
- ~/.config/ccpr/config.yaml
func (*Config) ResolveProfile ¶
ResolveProfile returns the AWS profile to use. Priority: flagProfile > config file > AWS_PROFILE env > "default".
func (*Config) ResolveRegion ¶ added in v0.2.1
ResolveRegion returns the AWS region to use. Priority: flagRegion > config file > "".
Click to show internal directories.
Click to hide internal directories.