Bash has a 'magical behavior', if you type 'ls', usually you will get colorful output, but if you redirect the output to a file, the color codes are gone. How to achive this effect using Go. e.g. With the following statement:
fmt.Println("\033[1;34mHello World!\033[0m")
I can see the text in color, but if I pipe the output to a file, the color is preserved, which is NOT what I want.
BTW, this question is mostly not related to Go, I just want to achive the effect in my go program.