diff --git a/svc/config.go b/svc/config.go index 989f79f..81d14fe 100644 --- a/svc/config.go +++ b/svc/config.go @@ -7,6 +7,7 @@ import ( "github.com/seriouspoop/gopush/config" "github.com/seriouspoop/gopush/model" + "github.com/seriouspoop/gopush/utils" ) const ( @@ -48,7 +49,7 @@ func (s *Svc) SetUserPreference() error { if err != nil { return err } - fmt.Println("Gathering default setting...") + utils.Logger(utils.LOG_INFO, "Gathering default settings...") if cfg.DefaultRemote == "" { fmt.Print("- Remote (default=origin): ") remoteName, err := s.r.ReadString('\n') diff --git a/utils/logger.go b/utils/logger.go index 9758a1d..0b8095d 100644 --- a/utils/logger.go +++ b/utils/logger.go @@ -2,6 +2,7 @@ package utils import ( "fmt" + "strings" "github.com/fatih/color" ) @@ -28,6 +29,8 @@ func Logger(s log, msg string) { } if s != LOG_INFO { + msg = strings.ToLower(msg) // convert to lowercase + msg = strings.ReplaceAll(msg, ".", "") // remove punctuation msg = faint(msg) }