Files
atomctl/cmd/swag.go

22 lines
403 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package cmd
import "github.com/spf13/cobra"
func CommandSwag(root *cobra.Command) {
cmd := &cobra.Command{
Use: "swag",
Short: "Generate swag docs",
Long: `Swagger 文档相关命令组:包含 init生成文档与 fmt格式化注释`,
}
cmds := []func(*cobra.Command){
CommandSwagInit,
CommandSwagFmt,
}
for _, c := range cmds {
c(cmd)
}
root.AddCommand(cmd)
}