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:
committed by
Chris Cummer
parent
c3abb76612
commit
0b20c4939e
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user