From d8ce91efac0fa84b5bfb60a0203053cc8818b81b Mon Sep 17 00:00:00 2001 From: bcleenders Date: Tue, 23 Dec 2014 23:20:30 +0100 Subject: [PATCH] Prevents repl panic --- AUTHORS | 1 + CONTRIBUTORS | 1 + db/repl.go | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 7035a5b..16d19a7 100644 --- a/AUTHORS +++ b/AUTHORS @@ -9,6 +9,7 @@ # Please keep the list sorted. Alexander Peters +Bram Leenders Google Inc. Jay Graves Jeremy Jay diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 10ae14f..fdc75b4 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -13,6 +13,7 @@ Alexander Peters Barak Michener +Bram Leenders Jay Graves Jeremy Jay Pius Uzamere diff --git a/db/repl.go b/db/repl.go index da3aff9..6722299 100644 --- a/db/repl.go +++ b/db/repl.go @@ -124,7 +124,7 @@ func Repl(h *graph.Handle, queryLanguage string, cfg *config.Config) error { fmt.Println("Debug Toggled") continue - case strings.HasPrefix(line, ":a"): + case strings.HasPrefix(line, ":a "): quad, err := cquads.Parse(line[3:]) if !quad.IsValid() { if err != nil { @@ -135,7 +135,7 @@ func Repl(h *graph.Handle, queryLanguage string, cfg *config.Config) error { h.QuadWriter.AddQuad(quad) continue - case strings.HasPrefix(line, ":d"): + case strings.HasPrefix(line, ":d "): quad, err := cquads.Parse(line[3:]) if !quad.IsValid() { if err != nil {