feat: update gen model
This commit is contained in:
@@ -8,10 +8,10 @@ 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) {
|
||||||
@@ -20,6 +20,7 @@ func CommandGenEnum(root *cobra.Command) {
|
|||||||
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")
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ func CommandGenRoute(root *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