package
0.0.0-20241028182034-32f8c4f5d23a
Repository: https://github.com/tayron/golang-estudos.git
Documentation: pkg.go.dev

# README

Get local IP and MAC address

Current IP address :  192.168.0.10
Current IP address :  172.18.0.1
Current IP address :  172.17.0.1
Current IP address :  172.30.0.1
Current IP address :  172.19.0.1
Current IP address :  172.27.0.1
------------------------------
We want the interface name that has the current IP address
MUST NOT be binded to 127.0.0.1 
------------------------------
[ 0 ] lo > 127.0.0.1/8
[ 1 ] lo > ::1/128
[ 0 ] wlp3s0 > 192.168.0.10/24
[ 1 ] wlp3s0 > 2804:14c:5b80:93ad:9596:6407:8e42:dd3a/64
[ 2 ] wlp3s0 > 2804:14c:5b80:93ad:8801:d04:6a13:c537/64
[ 3 ] wlp3s0 > fe80::d991:85e1:bef1:7973/64
[ 0 ] br-524ec882fead > 172.18.0.1/16
[ 0 ] docker0 > 172.17.0.1/16
[ 0 ] br-c6f7b5340ce8 > 172.30.0.1/16
[ 0 ] br-cdee2bb7e6b4 > 172.19.0.1/16
[ 1 ] br-cdee2bb7e6b4 > fe80::42:2dff:fe07:1092/64
[ 0 ] br-ecab8aa0f002 > 172.27.0.1/16
Use name :  br-ecab8aa0f002
[ 0 ] veth69162e2 > fe80::e431:4ff:fecf:32d/64
------------------------------
Hardware name :  br-ecab8aa0f002
MAC address :  03:12:e6:a8:ef:1b
Physical hardware address : 02:4T:e3:a0:ef:1c