Standard library / crypto/tls
tls.RecordHeaderError
Error for invalid TLS record headers; contains message, record header and optionally underlying connection. Synthetic error classification. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
type RecordHeaderError struct { Msg string RecordHeader [5]byte Conn net.Conn}Working Example
Example Snippetgo
package main
import ( "crypto/tls" "fmt")
func main() { var e error = tls.RecordHeaderError{Msg: "demo"}; fmt.Println(e != nil) }
func must[T any](v T, e error) T { if e != nil { panic(e) } return v}func check(e error) { if e != nil { panic(e) }}