code: func GeneratePrivateKey() (crypto.Signer, string, error) {
  	pk, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
  	if err != nil {
  		return nil, "", fmt.Errorf("error generating private key: %s", err)
  	}
  
  	bs, err := x509.MarshalECPrivateKey(pk)
  	if err != nil {
  		return nil, "", fmt.Errorf("error generating private key: %s", err)
  	}
  
  	var buf bytes.Buffer
  	err = pem.Encode(&buf, &pem.Block{Type: "EC PRIVATE KEY", Bytes: bs})
  	if err != nil {
  		return nil, "", fmt.Errorf("error encoding private key: %s", err)
  	}
  
  	return pk, buf.String(), nil
  }
docs: // GeneratePrivateKey generates a new ecdsa private key