21 lines
412 B
Go
21 lines
412 B
Go
package makecmd
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
"yizhisec.com/hsv2/forge/internal/controller/maker"
|
|
"yizhisec.com/hsv2/forge/internal/opt"
|
|
)
|
|
|
|
func K0s() *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "k0s",
|
|
Short: "make k0s files(binary, images)",
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
mk := maker.NewMaker(opt.Cfg.Make.Dir)
|
|
return mk.K0s(cmd.Context())
|
|
},
|
|
}
|
|
|
|
return cmd
|
|
}
|