Skip to content

Commit

Permalink
exit initial variable load on blank line
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulexus committed Jul 24, 2018
1 parent b773c38 commit 5b7762d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions agi.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 5b7762d

Please sign in to comment.