mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-02 22:39:42 +08:00
feat: gen markdown docs for command
This commit is contained in:
@@ -40,7 +40,7 @@ var cpuProfile string
|
||||
var cpuProfileDuration time.Duration
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(boomCmd)
|
||||
RootCmd.AddCommand(boomCmd)
|
||||
|
||||
boomCmd.Flags().Int64Var(&maxRPS, "max-rps", 0, "Max RPS that boomer can generate, disabled by default.")
|
||||
boomCmd.Flags().StringVar(&requestIncreaseRate, "request-increase-rate", "-1", "Request increase rate, disabled by default.")
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
package cmd
|
||||
|
||||
// import (
|
||||
// "log"
|
||||
|
||||
// "github.com/spf13/cobra/doc"
|
||||
// )
|
||||
|
||||
// func main() {
|
||||
|
||||
// err := doc.GenMarkdownTree(rootCmd, "/tmp")
|
||||
// if err != nil {
|
||||
// log.Fatal(err)
|
||||
// }
|
||||
// }
|
||||
@@ -26,7 +26,7 @@ var har2caseCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(har2caseCmd)
|
||||
RootCmd.AddCommand(har2caseCmd)
|
||||
|
||||
// Here you will define your flags and configuration settings.
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
"github.com/httprunner/httpboomer"
|
||||
)
|
||||
|
||||
// rootCmd represents the base command when called without any subcommands
|
||||
var rootCmd = &cobra.Command{
|
||||
// RootCmd represents the base command when called without any subcommands
|
||||
var RootCmd = &cobra.Command{
|
||||
Use: "httpboomer",
|
||||
Short: "One-stop solution for HTTP(S) testing.",
|
||||
Long: `HttpBoomer is the next generation for HttpRunner. Enjoy! ✨ 🚀 ✨
|
||||
@@ -24,7 +24,7 @@ Copyright 2021 debugtalk`,
|
||||
// Execute adds all child commands to the root command and sets flags appropriately.
|
||||
// This is called by main.main(). It only needs to happen once to the rootCmd.
|
||||
func Execute() {
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
if err := RootCmd.Execute(); err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ var runCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(runCmd)
|
||||
RootCmd.AddCommand(runCmd)
|
||||
runCmd.Flags().BoolP("silent", "s", false, "Disable logging request & response details")
|
||||
// runCmd.Flags().BoolP("gen-html-report", "r", false, "Generate HTML report")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user