spud/cli/daemon.go

22 lines
353 B
Go
Raw Normal View History

2024-10-02 02:56:25 +00:00
package cli
import (
"github.com/spf13/cobra"
daemon "spud/daemon"
)
func getDaemonCommand() *cobra.Command {
startDaemon := &cobra.Command{
Use: "daemon",
Short: "Starts a daemon instance.",
RunE: func(cmd *cobra.Command, args []string) error {
d := daemon.NewDaemon("", 8000)
d.Start()
return nil
},
}
return startDaemon
}