iori

Fig 5 · marker · 2019

Match and mark strings for colorful terminal output.

A small Go library. Give it rules, each a matcher and a color, and it marks every match: words, the first n, regular expressions, text between brackets or parentheses, timestamps, or a matcher you write yourself. Put it in front of a logger or any io.Writer and the whole log stream comes out marked. MIT licensed.

marker MatchTimestamp() MatchBracketSurrounded() MatchAll("marker") 001LINE