Пример #1
0
// Send a command to the Redis server and receive its reply
func (c *Client) Send(args ...interface{}) (interface{}, error) {
	_, err := gedis.Write(c.conn, args...)
	if err != nil {
		return nil, err
	}
	return c.Read()
}
Пример #2
0
func (er *RedisWriter) Write(p []byte) (int, error) {

	n, err := gedis.Write(er.c, er.cmd, er.dest, string(p[:]))
	if err != nil {
		panic(err)
	}

	return n, nil
}