github.com/switchupcb/yaegi@v0.10.2/_test/issue-1167.go (about) 1 package main 2 3 import ( 4 "crypto/ecdsa" 5 "crypto/elliptic" 6 "crypto/rand" 7 ) 8 9 func main() { 10 key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) 11 if err != nil { 12 panic(err) 13 } 14 pub := key.Public().(*ecdsa.PublicKey) 15 println(pub.Params().Name) 16 } 17 18 // Output: 19 // P-256