doodle/cmd/doodad/main.go
Noah Petherbridge 2b42a072a0 Code Layout Refactor
* All private Doodle source code into the pkg/ folder.
* Potentially public code into the lib/ folder.
* Centralize the logger into a subpackage.
2019-04-09 17:35:44 -07:00

41 lines
712 B
Go

// doodad is the command line developer tool for Doodle.
package main
import (
"log"
"os"
"sort"
"git.kirsle.net/apps/doodle/cmd/doodad/commands"
doodle "git.kirsle.net/apps/doodle/pkg"
"github.com/urfave/cli"
)
var Build = "N/A"
func main() {
app := cli.NewApp()
app.Name = "doodad"
app.Usage = "command line interface for Doodle"
app.Version = doodle.Version + " build " + Build
app.Flags = []cli.Flag{
cli.BoolFlag{
Name: "debug, d",
Usage: "enable debug level logging",
},
}
app.Commands = []cli.Command{
commands.Convert,
}
sort.Sort(cli.FlagsByName(app.Flags))
sort.Sort(cli.CommandsByName(app.Commands))
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}