File: cluster_go16.go

package info (click to toggle)
golang-github-mna-redisc 1.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 308 kB
  • sloc: ruby: 1,261; sh: 101; makefile: 5
file content (15 lines) | stat: -rw-r--r-- 297 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// +build !go1.7

package redisc

import (
	"github.com/gomodule/redigo/redis"
)

// get connection from the pool
// pre go1.7, Pool has no GetContext method, so it always
// calls Get.
func (c *Cluster) getFromPool(p *redis.Pool) (redis.Conn, error) {
	conn := p.Get()
	return conn, conn.Err()
}