Closed FUTC-Coding closed 5 years ago
if I just use the ansi color directly and not through the library I have the same problem so it's actually not the libraries fault I guess.
const (
color = "\033[1;34m%s\033[0m"
)
func main() {
w := new(tabwriter.Writer)
w.Init(os.Stdout, 0, 0, 0, ' ', tabwriter.Debug)
fmt.Fprintln(w, "a\tb\tc")
fmt.Fprintf(w, color, "abc\tdef\tghi")
w.Flush()
}
output:
Hi,
Unfortunately, I'm archiving this project and will no longer maintaining it. For more information, please read my blog post: Taking an indefinite sabbatical from my projects.
Thanks for the feedback and contribution.
I am having a weird problem. When using a color It destroys the formatting of the text/tabwriter for some reason. When I don't use any colors the formatting is fine. This is the code I wrote for testing this:
and this is the output I am getting:![screenshot 2018-09-30 at 16 33 07](https://user-images.githubusercontent.com/12715492/46258643-89dbf180-c4ce-11e8-9460-9d30e9c16c4b.png)
is this a bug or am I doing something wrong?