Standard library / net/url

url.Error.Temporary()

Delegate temporary classification to the wrapped error, if supported; do not use this alone for retry policy. Expected stdout: 'false\n'.

Formal Syntax & Structure

go syntaxgo
func (e *Error) Temporary() bool

Return Value

bool

Operation result; check errors and validity indicators when returned.

Working Example

Example Snippetgo
package main
import (  "errors"  "fmt"  "net/url")
func main() { e := &url.Error{Err: errors.New("demo")}; 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)  }}
Go Reference