From e780c1ceb99cd1484b362db9af1881f07142eb82 Mon Sep 17 00:00:00 2001 From: Jeremy Jay Date: Wed, 16 Jul 2014 13:49:39 -0400 Subject: [PATCH] Register should be RegisterIterator --- graph/iterator.go | 4 ++-- graph/leveldb/iterator.go | 2 +- graph/memstore/iterator.go | 2 +- graph/mongo/iterator.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/graph/iterator.go b/graph/iterator.go index 3ad28de..27a6f02 100644 --- a/graph/iterator.go +++ b/graph/iterator.go @@ -167,12 +167,12 @@ var ( } ) -// Register adds a new iterator type to the set of acceptable types, returning +// RegisterIterator adds a new iterator type to the set of acceptable types, returning // the registered Type. // Calls to Register are idempotent and must be made prior to use of the iterator. // The conventional approach for use is to include a call to Register in a package // init() function, saving the Type to a private package var. -func Register(name string) Type { +func RegisterIterator(name string) Type { lock.Lock() defer lock.Unlock() for i, t := range types { diff --git a/graph/leveldb/iterator.go b/graph/leveldb/iterator.go index be044e9..0e3f6e0 100644 --- a/graph/leveldb/iterator.go +++ b/graph/leveldb/iterator.go @@ -198,7 +198,7 @@ func (it *Iterator) DebugString(indent int) string { var levelDBType graph.Type func init() { - levelDBType = graph.Register("leveldb") + levelDBType = graph.RegisterIterator("leveldb") } func Type() graph.Type { return levelDBType } diff --git a/graph/memstore/iterator.go b/graph/memstore/iterator.go index b3bf9f4..3b7bfa8 100644 --- a/graph/memstore/iterator.go +++ b/graph/memstore/iterator.go @@ -104,7 +104,7 @@ func (it *Iterator) DebugString(indent int) string { var memType graph.Type func init() { - memType = graph.Register("llrb") + memType = graph.RegisterIterator("llrb") } func Type() graph.Type { return memType } diff --git a/graph/mongo/iterator.go b/graph/mongo/iterator.go index 4587b3c..58c50e4 100644 --- a/graph/mongo/iterator.go +++ b/graph/mongo/iterator.go @@ -160,7 +160,7 @@ func (it *Iterator) Size() (int64, bool) { var mongoType graph.Type func init() { - mongoType = graph.Register("mongo") + mongoType = graph.RegisterIterator("mongo") } func Type() graph.Type { return mongoType }