Skip to content

Commit

Permalink
fix: invalid key error message
Browse files Browse the repository at this point in the history
  • Loading branch information
seriouspoop committed Oct 23, 2024
1 parent 4438352 commit c2881ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion svc/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var (
ErrInvalidAuthMethod = errors.New("invalid auth method")
ErrWaitExit = errors.New("waiting for user")
ErrInvalidPassphrase = errors.New("invalid passphrase")
ErrKeyNotSupported = errors.New("invalid key")
ErrKeyNotSupported = errors.New("invalid key on remote")
ErrAuthLoadFailed = errors.New("failed to load auth")
ErrAlreadyUpToDate = errors.New("already up to date")
ErrRemoteBranchNotFound = errors.New("remote branch not found")
Expand Down
11 changes: 5 additions & 6 deletions utils/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,20 @@ const (
func Logger(s log, msg string) {
statusToUnicode := map[log]string{
LOG_INFO: "",
LOG_STRICT_INFO: "",
LOG_SUCCESS: green("\U00002714 "),
LOG_FAILURE: red("\U00002718 "),
LOG_STRICT_INFO: green(">>"),
LOG_SUCCESS: green("\U00002714"),
LOG_FAILURE: red("\U00002718"),
}

if s == LOG_STRICT_INFO {
msg = ">> " + msg
msg = red(msg)
msg = green(msg)
} else if s != LOG_INFO && s != LOG_STRICT_INFO {
msg = strings.ToLower(msg) // convert to lowercase
msg = strings.ReplaceAll(msg, ".", "") // remove punctuation
msg = faint(msg)
}

fmt.Printf("%s%s\n", statusToUnicode[s], msg)
fmt.Printf("%s %s\n", statusToUnicode[s], msg)
}

func ErrorSymbol() string {
Expand Down

0 comments on commit c2881ff

Please sign in to comment.