Standard library / crypto/x509
crypto/x509.OID
Object identifier using dotted numeric arcs. Supports binary content octets and text conversion; unlike asn1.ObjectIdentifier supports large arcs. Expected stdout: '1.2.3\n'.
Formal Syntax & Structure
go syntaxgo
type OID struct {}Working Example
Example Snippetgo
package main
import ( "crypto/x509" "fmt")
func main() { o := must(x509.ParseOID("1.2.3")); fmt.Println(o.String()) }
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) }}