package main type indexCmd struct { Paths []string `arg:"" help:"The paths to the repositories to include in the index."` } func (i *indexCmd) Run() error { return generateIndex(i.Paths) } type repoCmd struct { Path string `arg:"" help:"The path to the repository."` LogLimit int `short:"l" help:"The limit of commits to show in the log"` } func (r *repoCmd) Run() error { return generateRepo(r.Path) } var cli struct { Debug bool `help:"Print debug information."` Index indexCmd `cmd:"" help:"Generate the repository index page."` Repo repoCmd `cmd:"" help:"Generate the repository pages."` }