Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Show HN: Curl https://ec2.shop. Parent comment
I've got some Go code that you can reuse if you want to the escape codes in Go: https://github.com/lmorg/murex/blob/master/utils/ansi/codes....
Just bare in mind that any numbers you see in documentation are sent as ASCII values rather than integers. eg `ESC[31m` (red text) should be sent to the terminal as
[]byte{ // http://www.asciitable.com/ 27, // ESC character code 91, // '[' 51, // '3' 49, // '1' 109, // 'm' }
'm' == 109 Asc("m") == 109 ...etc...
I've got some Go code that you can reuse if you want to the escape codes in Go: https://github.com/lmorg/murex/blob/master/utils/ansi/codes....
Just bare in mind that any numbers you see in documentation are sent as ASCII values rather than integers. eg `ESC[31m` (red text) should be sent to the terminal as
Though, as you know, most languages will have some syntactic sugar to translate characters to their ASCII values, eg so at least you don't have to write all those values by hand.