Standard library / crypto/x509/pkix
crypto/x509/pkix.RDNSequence.String()
Formats a distinguished-name sequence for display. Expected stdout: 'CN=Demo\n'.
Formal Syntax & Structure
go syntaxgo
func (r RDNSequence) String() stringReturn Value
string
Result as described above; check any returned error before use.
Working Example
Example Snippetgo
package main
import ( "crypto/x509/pkix" "fmt")
func main() { r := (pkix.Name{CommonName: "Demo"}).ToRDNSequence(); fmt.Println(r.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) }}