ensure card name is set
This commit is contained in:
parent
ed7c3ae7cc
commit
50ddfd0726
1 changed files with 4 additions and 10 deletions
|
|
@ -24,24 +24,18 @@ func random_hex() string {
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
help_flag_ptr := flag.Bool("help", false, "show the command line options")
|
|
||||||
tx_max_ptr := flag.Int("tx_max", 0, "set the maximum satoshis per transaction")
|
tx_max_ptr := flag.Int("tx_max", 0, "set the maximum satoshis per transaction")
|
||||||
day_max_ptr := flag.Int("day_max", 0, "set the maximum satoshis per day (24 hours)")
|
day_max_ptr := flag.Int("day_max", 0, "set the maximum satoshis per 24 hour day")
|
||||||
enable_flag_ptr := flag.Bool("enable", false, "enable the card for payments")
|
enable_flag_ptr := flag.Bool("enable", false, "enable the card for payments")
|
||||||
card_name_ptr := flag.String("name", "", "set a name for the card")
|
card_name_ptr := flag.String("name", "", "set a name for the card (must be set)")
|
||||||
|
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
// handle -help
|
if *card_name_ptr == "" {
|
||||||
|
|
||||||
if *help_flag_ptr == true {
|
|
||||||
flag.PrintDefaults()
|
flag.PrintDefaults()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println()
|
|
||||||
fmt.Println("use './createboltcard -help' to show command line options")
|
|
||||||
|
|
||||||
// create the keys
|
// create the keys
|
||||||
|
|
||||||
one_time_code := random_hex()
|
one_time_code := random_hex()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue