From 387f01f5310afdd037b42edcf86915dce97f287a Mon Sep 17 00:00:00 2001 From: aditya-K2 Date: Tue, 4 Oct 2022 01:51:16 +0530 Subject: [PATCH] Using utils.Print instead of fmt.Println --- config/config.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/config/config.go b/config/config.go index 86b7728..42610ce 100644 --- a/config/config.go +++ b/config/config.go @@ -1,7 +1,6 @@ package config import ( - "fmt" "io/ioutil" "os" "strings" @@ -39,7 +38,7 @@ func ReadConfig() { err := viper.ReadInConfig() if err != nil { - fmt.Println("Could Not Read Config file.") + utils.Print("RED", "Could Not Read Config file.\n") } // Expanding ~ to the User's Home Directory @@ -66,7 +65,7 @@ func GenerateKeyMap(funcMap map[string]func()) { func getMusicDirectory() string { content, err := ioutil.ReadFile(HOME_DIR + "/.config/mpd/mpd.conf") if err != nil { - fmt.Println("No Config File for mpd Found") + utils.Print("RED", "No Config File for mpd Found.\n") panic(err) } ab := string(content)