You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
proposal: crypto/x509: add MustParseOID function #81650
A x509.MustParseOID function would be useful for initialising OIDs in global variables, in the same vein as uuid.MustParse or regexp.MustCompile.
Sample implementation:
// MustParseOID is like [x509.ParseOID] but panics if the OID cannot be parsed.funcMustParseOID(sstring) x509.OID {
oid, err:=x509.ParseOID(s)
iferr!=nil {
panic(err)
}
returnoid
}
Activity
gabyhelp commentedon Sep 22, 2026
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
[-]proposal: crypto/x509: Add MustParseOID function[/-][+]proposal: crypto/x509: add MustParseOID function[/+]