🏗️ move make sub-cmd to sub-dir
This commit is contained in:
25
internal/cmd/makecmd/app.user.go
Normal file
25
internal/cmd/makecmd/app.user.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package makecmd
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
"yizhisec.com/hsv2/forge/internal/controller/maker"
|
||||
)
|
||||
|
||||
func appUser() *cobra.Command {
|
||||
var (
|
||||
replica int
|
||||
)
|
||||
|
||||
_cmd := &cobra.Command{
|
||||
Use: "user",
|
||||
Short: "Make User App",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
mk := maker.NewMaker()
|
||||
return mk.AppUser(cmd.Context(), replica)
|
||||
},
|
||||
}
|
||||
|
||||
_cmd.Flags().IntVar(&replica, "replica-count", 2, "Replica count")
|
||||
|
||||
return _cmd
|
||||
}
|
||||
Reference in New Issue
Block a user