Prevents repl panic

This commit is contained in:
bcleenders 2014-12-23 23:20:30 +01:00
parent dce931c33e
commit 6e62d346c9
3 changed files with 4 additions and 2 deletions

View file

@ -9,6 +9,7 @@
# Please keep the list sorted.
Alexander Peters <info@alexanderpeters.de>
Bram Leenders <bcleenders@gmail.com>
Google Inc.
Jay Graves <jaywgraves@gmail.com>
Jeremy Jay <jeremy@pbnjay.com>

View file

@ -13,6 +13,7 @@
Alexander Peters <info@alexanderpeters.de>
Barak Michener <barakmich@google.com> <barak@cayley.io> <me@barakmich.com>
Bram Leenders <bcleenders@gmail.com>
Jay Graves <jaywgraves@gmail.com>
Jeremy Jay <jeremy@pbnjay.com>
Pius Uzamere <pius+github@alum.mit.edu>

View file

@ -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 {