feat: add swag command

This commit is contained in:
Rogee
2024-12-21 00:00:14 +08:00
parent 401ed9a5bd
commit c5ecd6a36c
6 changed files with 151 additions and 5 deletions

20
cmd/swag.go Normal file
View File

@@ -0,0 +1,20 @@
package cmd
import "github.com/spf13/cobra"
func CommandSwag(root *cobra.Command) {
cmd := &cobra.Command{
Use: "swag",
Short: "Generate swag docs",
}
cmds := []func(*cobra.Command){
CommandSwagInit,
CommandSwagFmt,
}
for _, c := range cmds {
c(cmd)
}
root.AddCommand(cmd)
}