elastic / elastic/elastic-agent-libs

bug: drop go-colorable on non-windows systems

Open
#355 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
6
Forks
57
Avg merge
6d 7h
Merged PRs (30d)
3

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.