Skip to content

Commit

Permalink
refactor(util): split indentation in preparation for changes
Browse files Browse the repository at this point in the history
  • Loading branch information
xNaCly committed Apr 4, 2023
1 parent 1cb51f9 commit 6d525fc
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,15 @@ func commandPrint(index int, text string) {
}
return fmt.Sprint(index)
}()
if !CONFIG.SurpressOutput {
if CONFIG.ColorOutput {
log.Printf("%s%s | %s%s\n", colors[index%len(colors)], i, text, ANSI_RESET)
} else {
log.Printf("%s | %s\n", i, text)
}

if CONFIG.SurpressOutput {
return
}

if CONFIG.ColorOutput {
log.Printf("%s%s | %s%s\n", colors[index%len(colors)], i, text, ANSI_RESET)
} else {
log.Printf("%s | %s\n", i, text)
}
}

Expand Down

0 comments on commit 6d525fc

Please sign in to comment.