aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Ammons <gammons@gmail.com>2016-04-26 13:10:56 -0400
committerGrant Ammons <gammons@gmail.com>2016-04-26 13:10:56 -0400
commit695c60e3f58d831e4b05aa35114adff7e1c46d23 (patch)
tree84019a133b5b66c2873aaff4853e71e1e8ef1cb2
parente3213b3ef2c84387b66eeb731f5493c5e6da6a5d (diff)
Rename method to describe it better
-rw-r--r--todolist/app.go2
-rw-r--r--todolist/parser.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/todolist/app.go b/todolist/app.go
index 00effa7..e0f11d2 100644
--- a/todolist/app.go
+++ b/todolist/app.go
@@ -17,7 +17,7 @@ func NewApp() *App {
func (a *App) AddTodo(input string) {
parser := &Parser{}
- todo := parser.Parse(input)
+ todo := parser.ParseNewTodo(input)
a.TodoStore.Add(todo)
a.TodoStore.Save()
diff --git a/todolist/parser.go b/todolist/parser.go
index d3b5968..1e98d33 100644
--- a/todolist/parser.go
+++ b/todolist/parser.go
@@ -11,7 +11,7 @@ import (
type Parser struct{}
-func (p *Parser) Parse(input string) *Todo {
+func (p *Parser) ParseNewTodo(input string) *Todo {
todo := NewTodo()
todo.Subject = p.Subject(input)
todo.Projects = p.Projects(input)