Standard library / encoding/base64

encoding/base64.CorruptInputError.Error()

Returns a diagnostic containing the input byte offset of malformed data. Expected stdout: 'illegal base64 data at input byte 3\n'.

Formal Syntax & Structure

go syntaxgo
func (e CorruptInputError) Error() string

Return Value

string

Text representation.

Working Example

Example Snippetgo
package main
import (  "encoding/base64"  "fmt")
func must(e error) {  if e != nil {    panic(e)  }}
func main() { fmt.Println(base64.CorruptInputError(3).Error()) }
Go Reference