iterator.go: new error function errInvalidDataSource()

This commit is contained in:
Celestino Amoroso 2024-05-01 05:46:24 +02:00
parent 056d42d328
commit be874503ec

View File

@ -4,7 +4,10 @@
// iterator.go
package expr
import "fmt"
import (
"errors"
"fmt"
)
type Iterator interface {
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 {
return fmt.Errorf("no %q function defined in the data-source", name)
}
func errInvalidDataSource() error {
return errors.New("invalid data-source")
}