@@ -31,6 +31,10 @@ OPTIONS
31
31
32
32
FIND/LIST ACTIONS:
33
33
34
+ %s
35
+
36
+ MISC ACTIONS:
37
+
34
38
%s
35
39
36
40
HELP ACTIONS:
@@ -53,6 +57,7 @@ func usageString(optMap map[string]interface{}) {
53
57
var findActions []string
54
58
var helpActions []string
55
59
var flagActions []string
60
+ var miscActions []string
56
61
57
62
var maxLen1 int
58
63
var maxLen2 int
@@ -95,12 +100,18 @@ func usageString(optMap map[string]interface{}) {
95
100
helpActions = append (helpActions , fmt .Sprintf (usageTemplate , "-" + string (option .Short ), option .Long , option .Path , option .Help ))
96
101
case 3 :
97
102
flagActions = append (flagActions , fmt .Sprintf (usageTemplate , "-" + string (option .Short ), option .Long , option .Path , option .Help ))
103
+ case 4 :
104
+ miscActions = append (miscActions , fmt .Sprintf (usageTemplate , "-" + string (option .Short ), option .Long , option .Path , option .Help ))
98
105
}
99
106
}
100
107
101
- fmt .Println (fmt .Sprintf (HELP_STRING , APP , strings .Join (editActions , "\n " ),
102
- strings .Join (findActions , "\n " ), strings .Join (helpActions , "\n " ),
103
- strings .Join (flagActions , "\n " ), AUTHOR_EMAIL ))
108
+ fmt .Println (fmt .Sprintf (HELP_STRING , APP ,
109
+ strings .Join (editActions , "\n " ),
110
+ strings .Join (findActions , "\n " ),
111
+ strings .Join (miscActions , "\n " ),
112
+ strings .Join (helpActions , "\n " ),
113
+ strings .Join (flagActions , "\n " ),
114
+ AUTHOR_EMAIL ))
104
115
105
116
}
106
117
@@ -122,6 +133,7 @@ func initializeCommandLine() (map[string]interface{}, map[string]interface{}) {
122
133
{'E' , "edit" , "<id>" , "Edit entry by id" , 0 },
123
134
{'l' , "list-entry" , "<id>" , "List entry by id" , 1 },
124
135
{'x' , "export" , "<filename>" , "Export all entries to <filename>" , 1 },
136
+ {'g' , "genpass" , "<length>" , "Generate password of given length" , 4 },
125
137
}
126
138
127
139
for _ , opt := range stringOptions {
0 commit comments