diff options
Diffstat (limited to 'example/main.go')
| -rw-r--r-- | example/main.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/example/main.go b/example/main.go index 490421e..fe1b4f0 100644 --- a/example/main.go +++ b/example/main.go @@ -119,11 +119,9 @@ func (pb *Fruits) printTable() { func (pb *Fruits) sortTable(i int) { var count int - all := pb.SortByBrand() - for all.Scan() { - tmp := all.Next() + for fruit := range pb.IterByBrand() { count += 1 - log.Printf("found %d %s %s\n", count, tmp.Brand, tmp.City) + log.Printf("found %d %s %s\n", count, fruit.Brand, fruit.City) if count > i { break } |
