Skip to content

Instantly share code, notes, and snippets.

@ik5 ik5/interfaces.go
Created Mar 26, 2019

What would you like to do?
list all ethernet interfaces and its data including mtu, state etc...
package main
import (
func main() {
ifaces, err := net.Interfaces()
for _, iface := range ifaces {
fmt.Printf("%+v, %+v\n", iface, err)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.