Skip to content

Commit

Permalink
fix color output formatting in main function
Browse files Browse the repository at this point in the history
  • Loading branch information
leolovenet committed Dec 9, 2024
1 parent 001be15 commit 78d7ee6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,10 @@ func main() {
tailLen = idx[idxLen-3] - idx[idxLen-4]
tailSub = line[idx[idxLen-2]:idx[idxLen-1]] // step chart
tailStr = line[idx[idxLen-4]+len(tailSub) : idx[idxLen-3]] // skip "step" chart
tailStr = fmt.Sprintf("%s%s%s%s", tailSub, ColorCyan, tailStr, ColorReset)
if outputWithColor {
tailStr = fmt.Sprintf("%s%s%s", ColorCyan, tailStr, ColorReset)
}
tailStr = fmt.Sprintf("%s%s", tailSub, tailStr)
}

ipStr := line[idx[0] : idx[1]-tailLen]
Expand Down

0 comments on commit 78d7ee6

Please sign in to comment.