8000 Documentation lies about Println · Issue #218 · fatih/color · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Documentation lies about Println #218
Closed
@ShadiestGoat

Description

@ShadiestGoat

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:

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0