Standard library / encoding/ascii85
encoding/ascii85.CorruptInputError
Integer byte position associated with malformed ASCII85 input. Use errors.As to distinguish this from stream I/O errors. Expected stdout: 'true 0\n'.
Formal Syntax & Structure
go syntaxgo
type CorruptInputError int64Working Example
Example Snippetgo
package main
import ( "encoding/ascii85" "errors" "fmt")
func must(e error) { if e != nil { panic(e) }}
func main() { _, _, err := ascii85.Decode(make([]byte, 8), []byte("~"), true) var bad ascii85.CorruptInputError fmt.Println(errors.As(err, &bad), int64(bad))}