Golang net.Flags type and Flags.String() function example
package net
Golang net.Flags type and Flags.String() function usage example
package main
import (
"fmt"
"net"
)
func main() {
interfaces, err := net.Interfaces()
if err != nil {
fmt.Print(err)
return
}
for _, i := range interfaces {
fmt.Printf("Name : %v \n", i.Name)
// see http://golang.org/pkg/net/#Flags
fmt.Println("Interface type and supports : ", i.Flags.String())
}
}
References :
Advertisement
Something interesting
Tutorials
+6.4k Golang : Test input string for unicode example
+12.4k Golang : Print UTF-8 fonts on image example
+28.1k Golang : Decode/unmarshal unknown JSON data type with map[string]interface
+8.4k Prevent Write failed: Broken pipe problem during ssh session with screen command
+19.3k Golang : Execute shell command
+22.6k Golang : Convert Unix timestamp to UTC timestamp
+13.5k Golang : Increment string example
+6.6k Golang : Handling image beyond OpenCV video capture boundary
+14.5k Golang : On enumeration
+14.9k Golang : Get URI segments by number and assign as variable example
+9.9k Golang : interface - when and where to use examples
+17.6k Golang : Multi threading or run two processes or more example