mirror of
https://github.com/hanzoai/yaegi.git
synced 2026-10-01 00:49:47 +00:00
In that case, the value must be derefenced before extracting the method by index, otherwise an incorrect method is returned. Fixes #1167.
20 lines
275 B
Go
20 lines
275 B
Go
package main
|
|
|
|
import (
|
|
"crypto/ecdsa"
|
|
"crypto/elliptic"
|
|
"crypto/rand"
|
|
)
|
|
|
|
func main() {
|
|
key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
pub := key.Public().(*ecdsa.PublicKey)
|
|
println(pub.Params().Name)
|
|
}
|
|
|
|
// Output:
|
|
// P-256
|