aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-01-25 21:06:57 -0300
committerEuAndreh <eu@euandre.org>2025-01-25 21:06:57 -0300
commit39346467ce203c2e3eebf0fbab687568f5e67119 (patch)
tree27366a9eaca73c59ee3fa80a9ab7f055b205cfdc /src
parenttests/fiinha.go: Fix typo (diff)
downloadfiinha-39346467ce203c2e3eebf0fbab687568f5e67119.tar.gz
fiinha-39346467ce203c2e3eebf0fbab687568f5e67119.tar.xz
tests/fiinha.go: Add test for `commands` var
Diffstat (limited to 'src')
-rw-r--r--src/fiinha.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/fiinha.go b/src/fiinha.go
index fe2fa6a..a20d7c7 100644
--- a/src/fiinha.go
+++ b/src/fiinha.go
@@ -2422,13 +2422,13 @@ func getopt(
command := commandsMap[args.command]
if command.name == "" {
fmt.Fprintf(w, "Bad COMMAND: \"%s\".\n", args.command)
- usage(allArgs[0], w)
+ usage(argv0, w)
return argsT{}, commandT{}, 2
}
args, ok := command.getopt(args, w)
if !ok {
- usage(allArgs[0], w)
+ usage(argv0, w)
return argsT{}, commandT{}, 2
}
@@ -2436,11 +2436,11 @@ func getopt(
}
func runCommand(
- args argsT,
+ args argsT,
command commandT,
- stdin io.Reader,
- stdout io.Writer,
- stderr io.Writer,
+ stdin io.Reader,
+ stdout io.Writer,
+ stderr io.Writer,
) int {
iqueue, err := NewWithPrefix(args.databasePath, args.prefix)
if err != nil {
@@ -2457,7 +2457,7 @@ func runCommand(
return rc
}
-var commands = map[string]commandT {
+var commands = map[string]commandT{
"in": commandT{
name: "in",
getopt: topicGetopt,