feat: gen markdown docs for command

This commit is contained in:
debugtalk
2021-10-11 15:33:15 +08:00
parent beaf5adaef
commit 09fdaa8c35
11 changed files with 147 additions and 21 deletions

18
docs/doc_test.go Normal file
View File

@@ -0,0 +1,18 @@
package cmd
import (
"log"
"testing"
"github.com/spf13/cobra/doc"
"github.com/httprunner/httpboomer/httpboomer/cmd"
)
// run this test to generate markdown docs
func TestGenMarkdownTree(t *testing.T) {
err := doc.GenMarkdownTree(cmd.RootCmd, "./cmd/")
if err != nil {
log.Fatal(err)
}
}