Skip to content

fix: don't write ANSI escape codes, when colors are disabled

This introduces an internal type (sgrCode) to represent the SGR parameter.

In order to prevent accidental writes of escape codes in the future, its underlying type is deliberately chosen not to be easily append-able to a byte slice (like buf = append(buf, reset...)).

Merge request reports

Loading