Colors and Special Text Effects in Go Logs

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

External

Internal

Overview

Text effects:

  • Red: \u001B[31m
  • Blue: \u001B[34m
  • Green: \u001B[32m
  • Black: \u001B[30m
  • Yellow: \u001B[33m
  • Purple: \u001B[35m
  • Cyan: \u001B[36m
  • White: \u001B[37m
  • Bold: \u001B[1m

End text effect: \u001B[0m.

To combine effects: "\u001B[31m\u001B[1m ..... \u001B[0m".