Changeset 76 in code for trunk/cmd


Ignore:
Timestamp:
Dec 4, 2023, 2:21:03 AM (18 months ago)
Author:
Izuru Yakumo
Message:

The Emperor (IV)

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cmd/aya/main.go

    r75 r76  
    1 // $TheSupernovaDuo: marisa.chaotic.ninja/aya/cmd/aya, v0.6.6 2023-12-03 23:48:17+0000, yakumo_izuru Exp $
     1// $TheSupernovaDuo: marisa.chaotic.ninja/aya/cmd/aya, v0.6.7 2023-12-04 01:55:36+0000, yakumo_izuru Exp $
    22package main
    33
     
    376376}
    377377
    378 // Print usage notes
    379 func printUsage() {
    380         fmt.Printf("Usage: %s <command> [args]\n", os.Args[0])
    381         fmt.Printf("Where <command> is one of\n")
    382         fmt.Printf("\n")
    383         fmt.Printf("\tbuild\t(Re-)builds site or a specific file\n")
    384         fmt.Printf("\tclean\trm -rf %s\n", PUBDIR)
    385         fmt.Printf("\tserve\tServes the %s directory over HTTP\n", PUBDIR)
    386         fmt.Printf("\tvar\tPrint a list of variables defined in a given file, or values of certain variables\n")
    387         fmt.Printf("\twatch\t(Re-)builds site and looks for changes\n")
    388         os.Exit(0)
    389 }
    390 
    391378// Main loop
    392379func main() {
    393380        if len(os.Args) == 1 {
    394                 printUsage()
     381                fmt.Println("No command supplied. See 'aya help'")
     382                os.Exit(1)
    395383        }
    396384        cmd := os.Args[1]
     
    413401                os.RemoveAll(PUBDIR)
    414402        case "help":
    415                 printUsage()
     403                aya.PrintUsage()
    416404        case "serve":
    417405                aya.HttpServe(PUBDIR)
Note: See TracChangeset for help on using the changeset viewer.