Commit bae78f13 authored by Jeromy's avatar Jeromy

add an example to the tests to play around with the feature

parent cdef63fb
......@@ -27,7 +27,7 @@ func (s *Set) Len() int {
func (s *Set) Keys() []*Cid {
out := make([]*Cid, 0, len(s.set))
for k, _ := range s.set {
for k := range s.set {
c, _ := Cast([]byte(k))
out = append(out, c)
}
......@@ -44,7 +44,7 @@ func (s *Set) Visit(c *Cid) bool {
}
func (s *Set) ForEach(f func(c *Cid) error) error {
for cs, _ := range s.set {
for cs := range s.set {
c, _ := Cast([]byte(cs))
err := f(c)
if err != nil {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment