Standard library / crypto/tls
tls.CurveID
Numeric identifier for TLS key exchange groups. Support and defaults depend on Go version. Expected stdout: 'X25519\n'.
Formal Syntax & Structure
go syntaxgo
type CurveID uint16Working Example
Example Snippetgo
package main
import ( "crypto/tls" "fmt")
func main() { var g tls.CurveID = tls.X25519; fmt.Println(g) }
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) }}