// ping command func pingServer(c *client.GhostClient, args []string) (string, error) { if len(args) != 0 { return "", errors.New(fmt.Sprintf("wrong number of arguments to PING: need 0, get %d", len(args))) } reply, err := c.Ping() return reply.Values[0], err }