feat: update gen model
This commit is contained in:
@@ -8,18 +8,19 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"go.ipao.vip/atomctl/pkg/utils"
|
|
||||||
"go.ipao.vip/atomctl/pkg/utils/generator"
|
|
||||||
_ "github.com/lib/pq"
|
_ "github.com/lib/pq"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
"go.ipao.vip/atomctl/pkg/utils"
|
||||||
|
"go.ipao.vip/atomctl/pkg/utils/generator"
|
||||||
)
|
)
|
||||||
|
|
||||||
func CommandGenEnum(root *cobra.Command) {
|
func CommandGenEnum(root *cobra.Command) {
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "enum",
|
Use: "enum",
|
||||||
Aliases: []string{"e"},
|
Aliases: []string{"e"},
|
||||||
Short: "Generate enums",
|
Short: "Generate enums",
|
||||||
RunE: commandGenEnumE,
|
RunE: commandGenEnumE,
|
||||||
|
PostRunE: commandGenProviderE,
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.Flags().BoolP("flag", "f", true, "Flag enum values")
|
cmd.Flags().BoolP("flag", "f", true, "Flag enum values")
|
||||||
|
|||||||
@@ -15,10 +15,10 @@ import (
|
|||||||
|
|
||||||
func CommandGenRoute(root *cobra.Command) {
|
func CommandGenRoute(root *cobra.Command) {
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "route",
|
Use: "route",
|
||||||
Short: "generate routes",
|
Short: "generate routes",
|
||||||
RunE: commandGenRouteE,
|
RunE: commandGenRouteE,
|
||||||
// PostRunE: commandGenProviderE,
|
PostRunE: commandGenProviderE,
|
||||||
}
|
}
|
||||||
|
|
||||||
root.AddCommand(cmd)
|
root.AddCommand(cmd)
|
||||||
|
|||||||
Reference in New Issue
Block a user