Standard library / net
net.Flags.String()
Render the recognized flags as a human-readable string; avoid using this for portable machine parsing. Expected stdout: 'up|loopback\n'.
Formal Syntax & Structure
go syntaxgo
func (f Flags) String() stringReturn Value
string
Operation result; check errors and validity indicators when returned.
Working Example
Example Snippetgo
package main
import ( "fmt" "net")
func main() { fmt.Println((net.FlagUp | net.FlagLoopback).String()) }
func must[T any](v T, e error) T { if e != nil { panic(e) } return v}func check(e error) { if e != nil { panic(e) }}