Standard library / crypto/tls
tls.VersionTLS13
Numeric identifier for TLS13. Use MinVersion and MaxVersion for version policy. TLS 1.2 and 1.3 are modern protocol versions; prefer TLS 1.3 where compatible. The example prints the numeric identifier, not a negotiated value. Expected stdout: '772\n'.
Formal Syntax & Structure
go syntaxgo
const VersionTLS13 = 772Working Example
Example Snippetgo
package main
import ( "crypto/tls" "fmt")
func main() { fmt.Println(uint16(tls.VersionTLS13)) }
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) }}