A Go terminal UI for displaying network adapters in real time
Programming Snapshot – termui

Article from Issue 218/2019
Even command-line lovers appreciate a classic terminal UI. Mike Schilli shows how to whip up a Go program that dynamically displays network interfaces and IPs.
Every time I connect my laptop to a router for diagnostic purposes, the question arises: On which dynamically assigned IP address will the router see the laptop? After all, you need to enter a router address on the same subnet to display the router's admin page (Figure 1).

Figure 1: This machine uses an IP address on subnet 192.168.147.1/24 to connect to the router.
To do this, I used to type ifconfig
several times in a terminal window and extracted the desired address from the mess of data printed next to:
[...]
Use Express-Checkout link below to read the full article (PDF).
Buy this article as PDF
Express-Checkout as PDF
Price $2.95
(incl. VAT)
(incl. VAT)