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
+9.6k Golang : Replace a parameter's value inside a configuration file example
+5k Golang : Generate multiplication table from an integer example
+8.4k Golang : ffmpeg with os/exec.Command() returns non-zero status
+10.8k Golang : Pagination with go-paginator configuration example
+4.6k Python : Print unicode escape characters and string
+19.3k Golang : Convert date string to variants of time.Time type examples
+8.2k Golang : How to get garbage collection data?
+12.8k How to automatically restart your crashed Golang server
+4.4k PHP : Fix Call to undefined function curl_init() error
+10.7k Golang : Clean formatting/indenting or pretty print JSON result
+6.2k Golang : Gorrila mux.Vars() function example