gitssg/cmd.go
2024-06-30 00:26:09 +02:00

24 lines
537 B
Go

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."`
}
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."`
}