31 lines
465 B
Go
31 lines
465 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/dballard/warren/lib/warren"
|
|
"net"
|
|
)
|
|
|
|
var statusUsage = `
|
|
status -
|
|
`
|
|
|
|
var statusCmd = &SockCommand{
|
|
Command: warren.Command{
|
|
Name: "status",
|
|
Usage: "",
|
|
Summary: "Print status of warrend",
|
|
Help: statusUsage,
|
|
},
|
|
Run: statusRun,
|
|
}
|
|
|
|
func statusRun(cmd *SockCommand, c net.Conn, args ...string) {
|
|
if len(args) == 0 || args[0] == "help" {
|
|
fmt.Print(cmd.Help)
|
|
return
|
|
}
|
|
|
|
c.Write([]byte("status\000"))
|
|
}
|