Skip to content

Instantly share code, notes, and snippets.

@phayes
Last active May 19, 2016 00:11
Show Gist options
  • Save phayes/965f52cc8a54baa32329e49c78695385 to your computer and use it in GitHub Desktop.
Save phayes/965f52cc8a54baa32329e49c78695385 to your computer and use it in GitHub Desktop.
switch pub := cert.PublicKey.(type) {
case *rsa.PublicKey:
fmt.Println(pub.N)
case default:
fmt.Println("Error, not an RSA public key")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment