Commit 35c32d52 authored by Jeromy's avatar Jeromy

add some more helper functions to ease integration into go-ipfs

parent ce2167fe
...@@ -33,3 +33,12 @@ func (s *Set) Keys() []*Cid { ...@@ -33,3 +33,12 @@ func (s *Set) Keys() []*Cid {
} }
return out return out
} }
func (s *Set) Visit(c *Cid) bool {
if !s.Has(c) {
s.Add(c)
return true
}
return false
}
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