Standard library / net
net.UnixAddr.Network()
Return the network name stored in the Unix address. Expected stdout: 'unixgram\n'.
Formal Syntax & Structure
go syntaxgo
func (a *UnixAddr) Network() stringReturn Value
string
Operation result; check errors and validity indicators when returned.
Working Example
Example Snippetgo
package main
import ( "fmt" "net")
func main() { a := net.UnixAddr{Net: "unixgram", Name: "demo.sock"}; fmt.Println(a.Network()) }
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) }}