Standard library / strconv

strconv.ErrRange

Sentinel error indicating a parsed value exceeds the requested numeric range. Use errors.Is to detect wrapped errors. Expected stdout: '127 true\n'.

Formal Syntax & Structure

go syntaxgo
var ErrRange error

Working Example

Example Snippetgo
package main
import (  "errors"  "fmt"  "strconv")
func main() {  v, e := strconv.ParseInt("128", 10, 8)  fmt.Println(v, errors.Is(e, strconv.ErrRange))}
Go Reference