File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -376,16 +376,19 @@ func parseConfig(s *Site, file string) error {
376
376
func main () {
377
377
configFile := "config.toml"
378
378
rootPath := ""
379
+ showHelp := false
379
380
380
381
// parse flags
381
382
flag .StringVar (& configFile , "config" , configFile , "" )
382
383
flag .StringVar (& configFile , "c" , configFile , "" )
383
384
flag .StringVar (& rootPath , "root" , rootPath , "" )
384
385
flag .StringVar (& rootPath , "r" , rootPath , "" )
386
+ flag .BoolVar (& showHelp , "help" , showHelp , "" )
387
+ flag .BoolVar (& showHelp , "h" , showHelp , "" )
385
388
flag .Parse ()
386
389
387
390
command := os .Args [len (os .Args )- 1 ]
388
- if command != "build" && command != "serve" && command != "new" {
391
+ if showHelp || ( command != "build" && command != "serve" && command != "new" ) {
389
392
fmt .Printf (`Gozer - a fast & simple static site generator
390
393
391
394
Usage: gozer [OPTIONS] <COMMAND>
You can’t perform that action at this time.
0 commit comments