refactor: 整理结构和 maker 构建方式
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"yizhisec.com/hsv2/forge/internal/controller/maker"
|
||||
"yizhisec.com/hsv2/forge/internal/opt"
|
||||
)
|
||||
|
||||
func ES() *cobra.Command {
|
||||
@@ -18,7 +19,7 @@ func ES() *cobra.Command {
|
||||
Use: "es",
|
||||
Aliases: []string{"elastic", "elasticsearch"},
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
mk := maker.NewMaker()
|
||||
mk := maker.NewMaker(opt.Cfg.Make.Dir)
|
||||
return mk.Elastic(
|
||||
cmd.Context(),
|
||||
maker.WithElasticMakeHelper(makeHelper),
|
||||
|
||||
Reference in New Issue
Block a user