Permalink
Browse files

dont expose Pipe.Count()

  • Loading branch information...
1 parent 95b238a commit 9830056eb44b58f8dd65175404050f8a9cff550b Simon Zimmermann committed Jan 15, 2012
Showing with 6 additions and 6 deletions.
  1. +3 −3 commands.go
  2. +3 −3 godis.go
View
6 commands.go
@@ -730,9 +730,9 @@ func (pc *PipeClient) Exec() []*Reply {
Send(p, []byte("EXEC"))
}
- replies := make([]*Reply, 0, p.Count())
+ replies := make([]*Reply, 0, p.count())
- for p.Count() > 0 {
+ for p.count() > 0 {
replies = append(replies, p.getReply())
}
@@ -750,7 +750,7 @@ func (pc *PipeClient) Exec() []*Reply {
func (pc *PipeClient) Multi() error {
p := pc.pipe()
- if p.Count() > 0 {
+ if p.count() > 0 {
return errors.New("Cannot issue MULTI on a buffered pipe")
}
View
6 godis.go
@@ -150,7 +150,7 @@ func (p *Pipe) read(conn *conn) *Reply {
reply := conn.readReply()
- if p.Count() == 0 {
+ if p.count() == 0 {
p.free()
}
@@ -185,7 +185,7 @@ func (p *Pipe) write(cmd []byte) (*conn, error) {
// read a reply from the socket if we are expecting it.
func (p *Pipe) getReply() *Reply {
- if p.Count() == 0 {
+ if p.count() == 0 {
p.appendMode = true
p.transaction = false
return &Reply{Err: errors.New("No replies expected from conn")}
@@ -197,7 +197,7 @@ func (p *Pipe) getReply() *Reply {
}
// retrieve the number of replies available
-func (p *Pipe) Count() int {
+func (p *Pipe) count() int {
return p.replyCount
}

0 comments on commit 9830056

Please sign in to comment.