spud/cli/daemon.go

22 lines
358 B
Go
Raw Permalink 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, nil)
2024-10-02 02:56:25 +00:00
d.Start()
return nil
},
}
return startDaemon
}