iterator.go: new error function errInvalidDataSource()
This commit is contained in:
parent
056d42d328
commit
be874503ec
@ -4,7 +4,10 @@
|
|||||||
// iterator.go
|
// iterator.go
|
||||||
package expr
|
package expr
|
||||||
|
|
||||||
import "fmt"
|
import (
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
)
|
||||||
|
|
||||||
type Iterator interface {
|
type Iterator interface {
|
||||||
Next() (item any, err error) // must return io.EOF after the last item
|
Next() (item any, err error) // must return io.EOF after the last item
|
||||||
@ -17,3 +20,7 @@ type Iterator interface {
|
|||||||
func errNoOperation(name string) error {
|
func errNoOperation(name string) error {
|
||||||
return fmt.Errorf("no %q function defined in the data-source", name)
|
return fmt.Errorf("no %q function defined in the data-source", name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func errInvalidDataSource() error {
|
||||||
|
return errors.New("invalid data-source")
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user