Remove graph.Err helper function
Since Err() is now a member of the Iterator interface, we don't need this helper function anymore.
This commit is contained in:
parent
745d4874e6
commit
33dd596ab4
8 changed files with 8 additions and 19 deletions
|
|
@ -177,17 +177,6 @@ func Next(it Iterator) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
// Err is a convenience function that conditionally calls the Err method
|
||||
// of an Iterator if it is a Nexter. If the Iterator is not a Nexter, Err
|
||||
// returns nil.
|
||||
func Err(it Iterator) error {
|
||||
if n, ok := it.(Nexter); ok {
|
||||
return n.Err()
|
||||
}
|
||||
glog.Errorln("Calling Err on an un-nextable iterator")
|
||||
return nil
|
||||
}
|
||||
|
||||
// Height is a convienence function to measure the height of an iterator tree.
|
||||
func Height(it Iterator, until Type) int {
|
||||
if it.Type() == until {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue