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
+12.3k Golang : Get month name from date example
+11.6k Golang : Display a text file line by line with line number example
+8.3k Your page has meta tags in the body instead of the head
+14.9k Golang : How to check for empty array string or string?
+12.1k Golang : Pagination with go-paginator configuration example
+11.6k Golang : Simple file scaning and remove virus example
+13.5k Golang : Count number of runes in string
+11.6k Get form post value in Go
+9.4k Golang : Launch Mac OS X Preview (or other OS) application from your program example
+11.5k Golang : Handle API query by curl with Gorilla Queries example
+14.4k Golang : Parsing or breaking down URL