Standard library / encoding/hex
encoding/hex.InvalidByteError.Error()
Reports the invalid byte in a hexadecimal input. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
func (e InvalidByteError) Error() stringReturn Value
string
Text representation.
Working Example
Example Snippetgo
package main
import ( "encoding/hex" "fmt" "strings")
func must(e error) { if e != nil { panic(e) }}
func main() { fmt.Println(strings.Contains(hex.InvalidByteError(90).Error(), "U+005A")) }