22 lines
454 B
Go
22 lines
454 B
Go
package init
|
|
|
|
import (
|
|
"gitea.suyono.dev/suyono/wingmate/config"
|
|
"gitea.suyono.dev/suyono/wingmate/daemon"
|
|
"gitea.suyono.dev/suyono/wingmate/middleware"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func Command() *cobra.Command {
|
|
init := &cobra.Command{
|
|
Use: "init",
|
|
Short: "dummy init",
|
|
Args: cobra.NoArgs,
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
return middleware.CallChain(cmd, args, config.Read, daemon.Start)
|
|
},
|
|
}
|
|
|
|
return init
|
|
}
|