Skip to content

feat: colorize IP addresses in table output with -nc flag to disable#14

Merged
jftuga merged 2 commits intomainfrom
color
Feb 28, 2026
Merged

feat: colorize IP addresses in table output with -nc flag to disable#14
jftuga merged 2 commits intomainfrom
color

Conversation

@jftuga
Copy link
Copy Markdown
Owner

@jftuga jftuga commented Feb 28, 2026

Summary

  • IP addresses are now displayed in cyan in all three tables (interfaces, DHCP, gateway/DNS), with CIDR masks (e.g.,
    /24) left uncolored
  • Added -nc flag to disable color output
  • No new dependencies — uses raw ANSI escape codes with a Windows init() to enable virtual terminal processing
  • Updated Go from 1.24.1 to 1.26.0 and golang.org/x/net from v0.38.0 to v0.51.0

Test plan

  • Verify IPs render in cyan on macOS, Linux, and Windows terminals
  • Verify -nc flag disables all colorization
  • Verify column alignment is correct (tablewriter strips ANSI for width calculation)
  • Verify N/A and empty values are not wrapped in color codes

@jftuga jftuga merged commit 813c448 into main Feb 28, 2026
@jftuga jftuga deleted the color branch February 28, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant