package main import ( "fmt" "forge.cadoles.com/Cadoles/go-http-peering/crypto" ) func getPublicKey() { privateKey, err := loadPrivateKey() if err != nil { handleError(err) } publicPEM, err := crypto.EncodePublicKeyToPEM(privateKey.Public()) if err != nil { handleError(err) } fmt.Print(string(publicPEM)) }