Make query/... interfaces more idiomatic

Also revert the data type returned by queries to interface{} (the change
made sense at the time).
This commit is contained in:
kortschak 2015-02-10 10:06:57 +10:30
parent ad7649806b
commit 21c2d75d07
11 changed files with 304 additions and 299 deletions

View file

@ -265,7 +265,7 @@ var testQueries = []struct {
func runQueryGetTag(g []quad.Quad, query string, tag string) []string {
js := makeTestSession(g)
c := make(chan interface{}, 5)
js.ExecInput(query, c, -1)
js.Execute(query, c, -1)
var results []string
for res := range c {
@ -318,7 +318,7 @@ func TestIssue160(t *testing.T) {
ses := makeTestSession(issue160TestGraph)
c := make(chan interface{}, 5)
go ses.ExecInput(query, c, 100)
go ses.Execute(query, c, 100)
var got []string
for res := range c {
func() {
@ -327,7 +327,7 @@ func TestIssue160(t *testing.T) {
t.Errorf("Unexpected panic: %v", r)
}
}()
got = append(got, ses.ToText(res))
got = append(got, ses.Format(res))
}()
}
sort.Strings(got)