From 5b7762de4c06b7ad6aa701e175ca08b1bf32c4ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=C3=A1n=20C=20McCord?= Date: Tue, 24 Jul 2018 14:41:03 -0400 Subject: [PATCH] exit initial variable load on blank line --- agi.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/agi.go b/agi.go index 80e41ea..da54e0c 100644 --- a/agi.go +++ b/agi.go @@ -131,11 +131,13 @@ func NewWithEAGI(r io.Reader, w io.Writer, eagi io.Reader) *AGI { if s.Text() == "" { break } + terms := strings.Split(s.Text(), ":") if len(terms) == 2 { a.Variables[strings.TrimSpace(terms[0])] = strings.TrimSpace(terms[1]) } } + return &a }