Standard library / net/http
http.ErrSkipAltProtocol
An alternate transport can return this sentinel to request fallback to the normal transport; synthetic comparison here, fallback integration tested separately. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
var ErrSkipAltProtocol errorWorking Example
Example Snippetgo
package main
import ( "errors" "fmt" "net/http")
func main() { fmt.Println(errors.Is(http.ErrSkipAltProtocol, http.ErrSkipAltProtocol)) }
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) }}