Skip to content

Commit

Permalink
fix: config logging
Browse files Browse the repository at this point in the history
  • Loading branch information
seriouspoop committed Aug 29, 2024
1 parent 2c2a9cd commit 65e1a11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion svc/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

"github.com/seriouspoop/gopush/config"
"github.com/seriouspoop/gopush/model"
"github.com/seriouspoop/gopush/utils"
)

const (
Expand Down Expand Up @@ -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')
Expand Down
3 changes: 3 additions & 0 deletions utils/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package utils

import (
"fmt"
"strings"

"github.com/fatih/color"
)
Expand All @@ -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)
}

Expand Down

0 comments on commit 65e1a11

Please sign in to comment.