We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 011b22d + 8d9d74e commit 5c00d54Copy full SHA for 5c00d54
siggen/main.go
@@ -3,24 +3,23 @@ package main
3
import (
4
"fmt"
5
"github.com/stretchr/commander"
6
+ "github.com/stretchr/objx"
7
"github.com/stretchr/signature"
- "github.com/stretchr/stew/objects"
8
- "strconv"
9
)
10
11
// Generates a 32 character random signature
12
func main() {
13
commander.Go(func() {
14
15
commander.Map(commander.DefaultCommand, "", "",
16
- func(args objects.Map) {
+ func(args objx.Map) {
17
fmt.Println(signature.RandomKey(32))
18
})
19
20
commander.Map("len length=(int)", "Key length",
21
"Specify the length of the generated key",
22
23
- length, _ := strconv.Atoi(args.Get("length").(string))
+ length := args.Get("length").Int()
24
fmt.Println(signature.RandomKey(length))
25
26
0 commit comments