YouChuKoffee/app/utils/postbank/generate.go

20 lines
360 B
Go

package postbank
import (
"github.com/spf13/cobra"
)
// GenerateKey go run main.go postbank generateKey
var generateCmd = &cobra.Command{
Use: "generateKey",
Short: "邮储国密sm2公私钥生成",
Args: nil,
Run: generateRun,
}
func generateRun(cmd *cobra.Command, args []string) {
pri, pub := GenerateKey()
cmd.Println(pri)
cmd.Print(pub)
}