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

Add basic textfile widget.

This commit is contained in:
Chris Cummer
2018-04-12 16:51:30 -07:00
committed by Chris Cummer
parent 693a04b5e1
commit c3abb76612
3 changed files with 69 additions and 2 deletions

View File

@@ -23,9 +23,9 @@ func CreateConfigDir() bool {
// LoadConfigFile loads the config.yml file to configure the app
func LoadConfigFile() *config.Config {
configPath, _ := homedir.Expand("~/.wtf/config.yml")
absPath, _ := homedir.Expand("~/.wtf/config.yml")
cfg, err := config.ParseYamlFile(configPath)
cfg, err := config.ParseYamlFile(absPath)
if err != nil {
fmt.Println("\n\n\033[1m ERROR:\033[0m Could not load '\033[0;33mconfig.yml\033[0m'.\n Please add a \033[0;33mconfig.yml\033[0m file to your \033[0;33m~/.wtf\033[0m directory.\n See \033[1;34mhttps://github.com/senorprogrammer/wtf\033[0m for details.\n\n")
os.Exit(1)