feat: add swag command
This commit is contained in:
20
cmd/swag.go
Normal file
20
cmd/swag.go
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user