Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
xtaci committed Aug 9, 2024
1 parent 2e6b4b2 commit 12b5009
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/hppktool/cmd/keygen.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
*/
package cmd

Expand All @@ -21,7 +20,9 @@ Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("keygen called")
if dir, err := cmd.Flags().GetString("dir"); err == nil {
fmt.Println(dir)
}
},
}

Expand All @@ -36,5 +37,5 @@ func init() {

// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// keygenCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
keygenCmd.Flags().StringP("dir", "d", ".", "the key pair output path")
}

0 comments on commit 12b5009

Please sign in to comment.