From 4d34ea50cca25f05488a7f3493e7599f0ce865d3 Mon Sep 17 00:00:00 2001 From: Alex Peters Date: Tue, 8 Jul 2014 12:57:44 +0200 Subject: [PATCH] Fix typos and minor cleanup --- AUTHORS | 1 + CONTRIBUTORS | 1 + cayley.go | 8 ++++---- db/load.go | 2 -- graph/iterator.go | 2 +- graph/iterator/all_iterator.go | 2 +- graph/triplestore.go | 4 ++-- http/query.go | 2 -- 8 files changed, 10 insertions(+), 12 deletions(-) diff --git a/AUTHORS b/AUTHORS index cfba7c5..e769a7d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -8,6 +8,7 @@ # # Please keep the list sorted. +Alexander Peters Google Inc. Jay Graves Pius Uzamere diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 5e9fa6d..7d4f7a5 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -11,6 +11,7 @@ # # Please keep the list sorted. +Alexander Peters Barak Michener Jay Graves Pius Uzamere diff --git a/cayley.go b/cayley.go index b8c09ae..a848931 100644 --- a/cayley.go +++ b/cayley.go @@ -34,10 +34,10 @@ var queryLanguage = flag.String("query_lang", "gremlin", "Use this parser as the var configFile = flag.String("config", "", "Path to an explicit configuration file.") func Usage() { - fmt.Println("Cayley is a graph store and graph query layer.\n") - fmt.Println("Usage:") - fmt.Println(" cayley COMMAND [flags]\n") - fmt.Println("Commands:") + fmt.Println("Cayley is a graph store and graph query layer.") + fmt.Println("\nUsage:") + fmt.Println(" cayley COMMAND [flags]") + fmt.Println("\nCommands:") fmt.Println(" init\tCreate an empty database.") fmt.Println(" load\tBulk-load a triple file into the database.") fmt.Println(" http\tServe an HTTP endpoint on the given host and port.") diff --git a/db/load.go b/db/load.go index cfce2dc..f09962e 100644 --- a/db/load.go +++ b/db/load.go @@ -33,8 +33,6 @@ func Load(ts graph.TripleStore, cfg *config.Config, triplePath string, firstTime } else { LoadTriplesFromFileInto(ts, triplePath, cfg.LoadSize) } - case "rethink", "rethinkdb": - LoadTriplesFromFileInto(ts, triplePath, cfg.LoadSize) case "leveldb": LoadTriplesFromFileInto(ts, triplePath, cfg.LoadSize) case "mem": diff --git a/graph/iterator.go b/graph/iterator.go index eaf54f1..3ad28de 100644 --- a/graph/iterator.go +++ b/graph/iterator.go @@ -49,7 +49,7 @@ type Iterator interface { // These methods are the heart and soul of the iterator, as they constitute // the iteration interface. // - // To get the full results of iteraton, do the following: + // To get the full results of iteration, do the following: // while (!Next()): // emit result // while (!NextResult()): diff --git a/graph/iterator/all_iterator.go b/graph/iterator/all_iterator.go index 52b5cf7..22e0d1b 100644 --- a/graph/iterator/all_iterator.go +++ b/graph/iterator/all_iterator.go @@ -17,7 +17,7 @@ package iterator // Defines one of the base iterators, the All iterator. Which, logically // enough, represents all nodes or all links in the graph. // -// This particular file is actually vestigal. It's up to the TripleStore to give +// This particular file is actually vestigial. It's up to the TripleStore to give // us an All iterator that represents all things in the graph. So this is // really the All iterator for the MemTripleStore. That said, it *is* one of // the base iterators, and it helps just to see it here. diff --git a/graph/triplestore.go b/graph/triplestore.go index d6aa326..92ed9e9 100644 --- a/graph/triplestore.go +++ b/graph/triplestore.go @@ -74,7 +74,7 @@ type TripleStore interface { // Optimize an iterator in the context of the triple store. // Suppose we have a better index for the passed tree; this - // gives the TripleStore the oppotunity to replace it + // gives the TripleStore the opportunity to replace it // with a more efficient iterator. OptimizeIterator(it Iterator) (Iterator, bool) @@ -82,7 +82,7 @@ type TripleStore interface { // sever connections, etc) Close() - // Convienence function for speed. Given a triple token and a direction + // Convenience function for speed. Given a triple token and a direction // return the node token for that direction. Sometimes, a TripleStore // can do this without going all the way to the backing store, and // gives the TripleStore the opportunity to make this optimization. diff --git a/http/query.go b/http/query.go index 683e3d5..a8b8c2f 100644 --- a/http/query.go +++ b/http/query.go @@ -77,7 +77,6 @@ func (api *Api) ServeV1Query(w http.ResponseWriter, r *http.Request, params http default: return FormatJson400(w, "Need a query language.") } - var err error bodyBytes, err := ioutil.ReadAll(r.Body) if err != nil { return FormatJson400(w, err) @@ -126,7 +125,6 @@ func (api *Api) ServeV1Shape(w http.ResponseWriter, r *http.Request, params http default: return FormatJson400(w, "Need a query language.") } - var err error bodyBytes, err := ioutil.ReadAll(r.Body) if err != nil { return FormatJson400(w, err)