kas/cps/ping.go

18 lines
334 B
Go

package cps
func init() {
Register("ping", pingHandler)
}
// Ping just returns pong and is used to verify that the system is alive.
func pingHandler(cmd *Command) (*Response, error) {
message := "pong"
if len(cmd.Args) > 0 {
message += " (FYI, no additional args are used)"
}
return &Response{
Message: message,
}, nil
}