Add "wuffs help foo" for the command line tool

Updates #62
This commit is contained in:
Nigel Tao committed 2021-12-30 22:34:27 +11:00
1 parent 4e85543d9c
commit e1a6a7cd8c
3 files changed
+37 -11

No files matched your search

+9
View File
@@ -52,6 +52,8 @@ The commands are:
gen generate code for packages and dependencies
genlib generate software libraries
test test packages
Use "wuffs help <command>" for more information about a command.
`)
}
@@ -76,6 +78,13 @@ func main1() error {
return c.do(wuffsRoot, args[1:])
}
}
if (len(args) == 2) && (args[0] == "help") {
for _, c := range commands {
if args[1] == c.name {
return c.do(wuffsRoot, []string{"-help"})
}
}
}
}
usage()
os.Exit(1)