Closed ShadiestGoat closed 3 months ago
The documentation for Color.Println says:
Spaces are always added between operands and a newline is appended.
However, this is not the case. The method uses c.wrap around fmt.Sprint, which has the following space separation:
c.wrap
fmt.Sprint
Spaces are added between operands when neither is a string. Source
Example problem:
color.New(color.FgCyan).Println("Foo", "Bar")
Expected output is "Foo Bar", real output is "FooBar".
The documentation for Color.Println says:
However, this is not the case. The method uses
c.wrap
aroundfmt.Sprint
, which has the following space separation:Example problem:
Expected output is "Foo Bar", real output is "FooBar".