Skip to content

bug: drop go-colorable on non-windows systems #355

@kruskall

Description

@kruskall

Problem Description

github.com/mattn/go-colorable provides a color‑aware writer for Windows consoles. The current build links this package into binaries even on non‑Windows platforms.

Impact

Including a Windows‑specific dependency on other operating systems unnecessarily inflates the binary size and can introduce platform‑specific code paths that are never exercised. It also suggests that the build logic may be relying on runtime.GOOS checks instead of proper OS build tags, leading to incorrect conditional compilation.

Suggested Solution

Guard the import of go-colorable with appropriate build tags so that it is compiled only for Windows targets. Refactor any runtime.GOOS conditionals to use OS‑specific files where feasible, ensuring the final binary for Linux, macOS, or other platforms does not contain the Windows colorable writer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions