From fdefbdb64d9919cf2bb5c50318cdc98a105c9cfc Mon Sep 17 00:00:00 2001 From: Daniel Lohse Date: Sun, 14 Aug 2016 10:51:47 +0200 Subject: [PATCH] Fix custom ranger implementation in example project --- example/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/example/main.go b/example/main.go index 6e71a7f..1f6f3c4 100644 --- a/example/main.go +++ b/example/main.go @@ -40,12 +40,11 @@ func (dt *doneTODOs) New(todos map[string]*tTODO) *doneTODOs { // Range satisfies the jet.Ranger interface and only returns TODOs that are done, // even when the list contains TODOs that are not done. func (dt *doneTODOs) Range() (reflect.Value, reflect.Value, bool) { - //log.Printf("Range called. Current index is %v, keys are %+v, list is %+v", dt.i, dt.keys, dt.list) for dt.i < dt.len { key := dt.keys[dt.i] dt.i++ if dt.list[key].Done { - return reflect.ValueOf(key), reflect.ValueOf(dt.list[key]), (dt.i < dt.len) + return reflect.ValueOf(key), reflect.ValueOf(dt.list[key]), false } } return reflect.Value{}, reflect.Value{}, true