Files
mstore/docs/main.go
T
2026-02-21 20:07:37 +02:00

50 lines
868 B
Go

package main
import (
"fmt"
"time"
"os"
"github.com/spf13/cobra/doc"
"mstore/cmd/mstorectl/command"
)
func run() error {
var err error
os.Args[0] = "mstorectl"
util := command.NewUtil()
err = util.Build()
if err != nil {
return err
}
cmd := util.GetRooCmd()
now := time.Now()
header := &doc.GenManHeader{
Title: "mstore",
Section: "1",
Manual: "User commands",
Source: "mstorectl command",
Date: &now,
}
opts := doc.GenManTreeOptions {
Header: header,
Path: "./",
CommandSeparator: "-",
}
err = doc.GenManTreeFromOpts(cmd, opts)
if err != nil {
return err
}
return err
}
func main() {
err := run()
if err != nil {
fmt.Printf("err: %v\n", err)
}
}