Skip to content

Commit bb5607d

Browse files
author
Anand
committed
Using closures to wrap actions requiring maxKrypt
1 parent 098dc34 commit bb5607d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

main.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,21 @@ func performAction(optMap map[string]interface{}, optionMap map[string]interface
3838
var flag bool
3939

4040
boolActionsMap := map[string]voidFunc{
41-
"add": addNewEntry,
41+
"add": WrapperMaxKryptVoidFunc(addNewEntry),
4242
"version": printVersionInfo,
4343
"help": printUsage,
4444
"path": showActiveDatabasePath,
45-
"list-all": listAllEntries,
45+
"list-all": WrapperMaxKryptVoidFunc(listAllEntries),
4646
"encrypt": encryptActiveDatabase,
4747
}
4848

4949
stringActionsMap := map[string]actionFunc{
50-
"edit": editCurrentEntry,
50+
"edit": WrapperMaxKryptStringFunc(editCurrentEntry),
5151
"init": initNewDatabase,
52-
"list-entry": listCurrentEntry,
53-
"find": findCurrentEntry,
54-
"remove": removeCurrentEntry,
55-
"copy": copyCurrentEntry,
52+
"list-entry": WrapperMaxKryptStringFunc(listCurrentEntry),
53+
"find": WrapperMaxKryptStringFunc(findCurrentEntry),
54+
"remove": WrapperMaxKryptStringFunc(removeCurrentEntry),
55+
"copy": WrapperMaxKryptStringFunc(copyCurrentEntry),
5656
"use-db": setActiveDatabasePath,
5757
"export": exportToFile,
5858
}

0 commit comments

Comments
 (0)