21 lines
353 B
Go
21 lines
353 B
Go
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
|
|
}
|