Goal
Support loading a configuration file from the path ~/.config/dvopsctl.yaml in the user's home directory when no config path is explicitly provided.
Context
Currently, the dvopsctl CLI requires an explicit path or defaults to a fixed location. To improve developer experience and follow XDG Base Directory conventions, we want to support loading config from ~/.config/dvopsctl.yaml.
This behavior should only apply if no other config path is passed via CLI flags or environment variables.
Acceptance Criteria
Resources
Goal
Support loading a configuration file from the path
~/.config/dvopsctl.yamlin the user's home directory when no config path is explicitly provided.Context
Currently, the
dvopsctlCLI requires an explicit path or defaults to a fixed location. To improve developer experience and follow XDG Base Directory conventions, we want to support loading config from~/.config/dvopsctl.yaml.This behavior should only apply if no other config path is passed via CLI flags or environment variables.
Acceptance Criteria
~/.config/dvopsctl.yamlusingos.UserConfigDir()or similartestingpackage that:~/.config/dvopsctl.yamlResources
os.UserHomeDir()oros.UserConfigDir()to resolve user pathsos.Open,ioutil.ReadFile, oros.ReadFileto read YAMLt.TempDir()andos.Setenv()for test isolation