Hacks below use goproc to experiment with Go templates from the command-line.
$ echo false | goproc -e '{{.}} => {{index "....\001\000" (len (print .))}}{{"\n"}}'
false => 0
$ echo true | goproc -e '{{.}} => {{index "....\001\000" (len (print .))}}{{"\n"}}'
true => 1
$ echo false | goproc -e '{{printf "\033[1;3%cm%v\033[m\n" (index "....12" (len (print .))) .}}'
$ echo true | goproc -e '{{printf "\033[1;3%cm%v\033[m\n" (index "....12" (len (print .))) .}}'