Skip to content

Commit

Permalink
Removed more garbage.
Browse files Browse the repository at this point in the history
  • Loading branch information
brett19 committed Jan 14, 2015
1 parent cff2dbb commit 88d01dc
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,10 @@ type Bucket struct {
client *gocouchbaseio.Agent
}

type getResult struct {
bytes []byte
flags uint32
cas uint64
err error
}

func (b *Bucket) afterOpTimeout() <-chan time.Time {
return time.After(10 * time.Second)
}

type GetCallback func(interface{}, uint64, error)

type PendingOp interface {
Cancel() bool
}
Expand Down Expand Up @@ -288,7 +279,7 @@ func (e *viewError) Error() string {
}

// Performs a view query and returns a list of rows or an error.
func (b *Bucket) ExecuteViewQuery(q *ViewQuery, valsOut interface{}) (interface{}, error) {
func (b *Bucket) ExecuteViewQuery(q *ViewQuery, valuesPtr interface{}) (interface{}, error) {
capiEp := b.getViewEp()

urlParams := url.Values{}
Expand All @@ -303,13 +294,13 @@ func (b *Bucket) ExecuteViewQuery(q *ViewQuery, valsOut interface{}) (interface{
return nil, err
}

if valsOut == nil {
if valuesPtr == nil {
var vals []interface{}
valsOut = &vals
valuesPtr = &vals
}
viewResp := viewResponse{
Rows: viewRowDecoder{
Target: valsOut,
Target: valuesPtr,
},
}

Expand All @@ -329,7 +320,7 @@ func (b *Bucket) ExecuteViewQuery(q *ViewQuery, valsOut interface{}) (interface{
}
}

return valsOut, nil
return valuesPtr, nil
}

func (b *Bucket) GetIoRouter() *gocouchbaseio.Agent {
Expand Down

0 comments on commit 88d01dc

Please sign in to comment.