Standard library / encoding/base32
encoding/base32.CorruptInputError
Reports the position associated with corrupt Base32 input. Inspect its type rather than treating a nonempty decoded prefix as success. Expected stdout: 'true 0\n'.
Formal Syntax & Structure
go syntaxgo
type CorruptInputError int64Working Example
Example Snippetgo
package main
import ( "encoding/base32" "errors" "fmt")
func must(e error) { if e != nil { panic(e) }}
func main() { _, err := base32.StdEncoding.DecodeString("!=======") var bad base32.CorruptInputError fmt.Println(errors.As(err, &bad), int64(bad))}