Move iterators into separate package

Also reduce API exposure and use standard library more - and fix bugs I
previously introduces in mongo.
This commit is contained in:
kortschak 2014-06-30 22:22:50 +09:30
parent 88be6bee37
commit 1768e593a8
62 changed files with 3240 additions and 3130 deletions

View file

@ -16,7 +16,6 @@ package http
import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net/http"
@ -37,7 +36,7 @@ func ParseJsonToTripleList(jsonBody []byte) ([]*graph.Triple, error) {
}
for i, t := range tripleList {
if !t.IsValid() {
return nil, errors.New(fmt.Sprintf("Invalid triple at index %d. %s", i, t.ToString()))
return nil, fmt.Errorf("Invalid triple at index %d. %s", i, t)
}
}
return tripleList, nil