1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Accepts optional --config argument to specify a config file

This commit is contained in:
Chris Cummer
2018-04-15 14:41:39 -07:00
committed by Chris Cummer
parent c3abb76612
commit 0b20c4939e
2 changed files with 15 additions and 7 deletions

View File

@@ -22,8 +22,8 @@ func CreateConfigDir() bool {
}
// LoadConfigFile loads the config.yml file to configure the app
func LoadConfigFile() *config.Config {
absPath, _ := homedir.Expand("~/.wtf/config.yml")
func LoadConfigFile(filePath string) *config.Config {
absPath, _ := homedir.Expand(filePath)
cfg, err := config.ParseYamlFile(absPath)
if err != nil {