Standard library / net/netip

netip.IPv6LinkLocalAllRouters()

Return the IPv6 link-local all-routers multicast address; no network operation occurs. Expected stdout: 'ff02::2\n'.

Formal Syntax & Structure

go syntaxgo
func IPv6LinkLocalAllRouters() Addr

Return Value

Addr

Operation result; check errors and validity indicators when returned.

Working Example

Example Snippetgo
package main
import (  "fmt"  "net/netip")
func main() { fmt.Println(netip.IPv6LinkLocalAllRouters()) }
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)  }}
Go Reference