Skip to content

Commit

Permalink
Indent example code. s/embeds/contains/. Add missing period.
Browse files Browse the repository at this point in the history
  • Loading branch information
GeertJohan committed Jun 22, 2015
1 parent 6ab37ae commit 612b003
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions recordset.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,24 @@ func (rcs *Recordset) IsActive() bool {
return rcs.active.Get()
}

// Results returns a new receive-only channel with the results of the Scan/Query
// Results returns a new receive-only channel with the results of the Scan/Query.
// This is a more idiomatic approach to the iterator pattern in getting the
// results back from the recordset, and doesn't require the user to write the
// ugly select in their code.
// Result embeds A Record and an error reference.
// Result contains a Record and an error reference.
//
// Example:
//
// recordset, err := client.ScanAll(nil, namespace, set)
// handleError(err)
// for res := range recordset.Results() {
// if res.Err != nil {
// // handle error here
// } else {
// // process record here
// fmt.Println(res.Record.Bins)
// }
// }
// recordset, err := client.ScanAll(nil, namespace, set)
// handleError(err)
// for res := range recordset.Results() {
// if res.Err != nil {
// // handle error here
// } else {
// // process record here
// fmt.Println(res.Record.Bins)
// }
// }
func (rcs *Recordset) Results() <-chan *Result {
res := make(chan *Result, len(rcs.Records))

Expand Down

0 comments on commit 612b003

Please sign in to comment.