Using utils.Print instead of fmt.Println
This commit is contained in:
parent
06da246c3a
commit
387f01f531
|
@ -1,7 +1,6 @@
|
||||||
package config
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -39,7 +38,7 @@ func ReadConfig() {
|
||||||
|
|
||||||
err := viper.ReadInConfig()
|
err := viper.ReadInConfig()
|
||||||
if err != nil {
|
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
|
// Expanding ~ to the User's Home Directory
|
||||||
|
@ -66,7 +65,7 @@ func GenerateKeyMap(funcMap map[string]func()) {
|
||||||
func getMusicDirectory() string {
|
func getMusicDirectory() string {
|
||||||
content, err := ioutil.ReadFile(HOME_DIR + "/.config/mpd/mpd.conf")
|
content, err := ioutil.ReadFile(HOME_DIR + "/.config/mpd/mpd.conf")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("No Config File for mpd Found")
|
utils.Print("RED", "No Config File for mpd Found.\n")
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
ab := string(content)
|
ab := string(content)
|
||||||
|
|
Loading…
Reference in New Issue