code: func NewSignerFromKey(k interface{}) (Signer, error) {
  	var sshKey Signer
  	switch t := k.(type) {
  	case *rsa.PrivateKey:
  		sshKey = &rsaPrivateKey{t}
  	case *dsa.PrivateKey:
  		sshKey = &dsaPrivateKey{t}
  	case *ecdsa.PrivateKey:
  		if !supportedEllipticCurve(t.Curve) {
  			return nil, errors.New("ssh: only P256, P384 and P521 EC keys are supported.")
  		}
  
  		sshKey = &ecdsaPrivateKey{t}
  	default:
  		return nil, fmt.Errorf("ssh: unsupported key type %T", k)
  	}
  	return sshKey, nil
  }
docs: // NewSignerFromKey takes a pointer to rsa, dsa or ecdsa PrivateKey
  // returns a corresponding Signer instance. EC keys should use P256,
  // P384 or P521.