Files
atomctl/cmd/swag_fmt.go
2024-12-23 15:58:17 +08:00

26 lines
474 B
Go

package cmd
import (
"git.ipao.vip/rogeecn/atomctl/pkg/swag/format"
"github.com/spf13/cobra"
)
func CommandSwagFmt(root *cobra.Command) {
cmd := &cobra.Command{
Use: "fmt",
Aliases: []string{"f"},
Short: "swag format",
RunE: commandSwagFmtE,
}
root.AddCommand(cmd)
}
func commandSwagFmtE(cmd *cobra.Command, args []string) error {
return format.New().Build(&format.Config{
SearchDir: "./app/http",
Excludes: "",
MainFile: "main.go",
})
}