Extracted out evaluators

This commit is contained in:
Mike Farah
2020-11-22 11:56:28 +11:00
parent e451119014
commit fc3af441e5
8 changed files with 156 additions and 114 deletions
+6 -11
View File
@@ -5,17 +5,9 @@ import (
"container/list"
"gopkg.in/op/go-logging.v1"
logging "gopkg.in/op/go-logging.v1"
)
type dataTreeNavigator struct {
navigationPrefs NavigationPrefs
}
type NavigationPrefs struct {
FollowAlias bool
}
type DataTreeNavigator interface {
// given a list of CandidateEntities and a pathNode,
// this will process the list against the given pathNode and return
@@ -23,8 +15,11 @@ type DataTreeNavigator interface {
GetMatchingNodes(matchingNodes *list.List, pathNode *PathTreeNode) (*list.List, error)
}
func NewDataTreeNavigator(navigationPrefs NavigationPrefs) DataTreeNavigator {
return &dataTreeNavigator{navigationPrefs}
type dataTreeNavigator struct {
}
func NewDataTreeNavigator() DataTreeNavigator {
return &dataTreeNavigator{}
}
func (d *dataTreeNavigator) GetMatchingNodes(matchingNodes *list.List, pathNode *PathTreeNode) (*list.List, error) {