Register should be RegisterIterator
This commit is contained in:
parent
995b38fb5b
commit
e780c1ceb9
4 changed files with 5 additions and 5 deletions
|
|
@ -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.
|
// the registered Type.
|
||||||
// Calls to Register are idempotent and must be made prior to use of the iterator.
|
// 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
|
// 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.
|
// init() function, saving the Type to a private package var.
|
||||||
func Register(name string) Type {
|
func RegisterIterator(name string) Type {
|
||||||
lock.Lock()
|
lock.Lock()
|
||||||
defer lock.Unlock()
|
defer lock.Unlock()
|
||||||
for i, t := range types {
|
for i, t := range types {
|
||||||
|
|
|
||||||
|
|
@ -198,7 +198,7 @@ func (it *Iterator) DebugString(indent int) string {
|
||||||
var levelDBType graph.Type
|
var levelDBType graph.Type
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
levelDBType = graph.Register("leveldb")
|
levelDBType = graph.RegisterIterator("leveldb")
|
||||||
}
|
}
|
||||||
|
|
||||||
func Type() graph.Type { return levelDBType }
|
func Type() graph.Type { return levelDBType }
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ func (it *Iterator) DebugString(indent int) string {
|
||||||
var memType graph.Type
|
var memType graph.Type
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
memType = graph.Register("llrb")
|
memType = graph.RegisterIterator("llrb")
|
||||||
}
|
}
|
||||||
|
|
||||||
func Type() graph.Type { return memType }
|
func Type() graph.Type { return memType }
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,7 @@ func (it *Iterator) Size() (int64, bool) {
|
||||||
var mongoType graph.Type
|
var mongoType graph.Type
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
mongoType = graph.Register("mongo")
|
mongoType = graph.RegisterIterator("mongo")
|
||||||
}
|
}
|
||||||
|
|
||||||
func Type() graph.Type { return mongoType }
|
func Type() graph.Type { return mongoType }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue