Standard library / net
net.DNSError.Temporary()
Report the historical IsTemporary flag; it is not a complete retry policy. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
func (e *DNSError) Temporary() boolReturn Value
bool
Operation result; check errors and validity indicators when returned.
Working Example
Example Snippetgo
package main
import ( "fmt" "net")
func main() { e := &net.DNSError{IsTemporary: true}; fmt.Println(e.Temporary()) }
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) }}