2
1
Fork 0

Corrects error messaging

This commit is contained in:
sloum 2021-04-04 20:14:43 -07:00
parent 11d9235d0b
commit 040d8f2bd1
1 changed files with 5 additions and 2 deletions

View File

@ -244,7 +244,11 @@ func (b *Board) EnterCommand() {
b.Lanes[b.Current].Stories[b.Lanes[b.Current].Current].AddTask(name, b) b.Lanes[b.Current].Stories[b.Lanes[b.Current].Current].AddTask(name, b)
case "comment", "com", "c": case "comment", "com", "c":
b.Lanes[b.Current].Stories[b.Lanes[b.Current].Current].AddComment(name, b) b.Lanes[b.Current].Stories[b.Lanes[b.Current].Current].AddComment(name, b)
default:
b.SetMessage(fmt.Sprintf("Unknown target %q", f[1]), true)
} }
} else {
b.SetMessage("More info needed: 'create [target|location] [[value]]'", true)
} }
case "d", "del", "delete": case "d", "del", "delete":
if len(f) > 1 { if len(f) > 1 {
@ -260,12 +264,11 @@ func (b *Board) EnterCommand() {
val = f[2] val = f[2]
} }
b.Lanes[b.Current].Stories[b.Lanes[b.Current].Current].DeleteTask(val, b) b.Lanes[b.Current].Stories[b.Lanes[b.Current].Current].DeleteTask(val, b)
// TODO
default: default:
b.SetMessage(fmt.Sprintf("Unknown target %q", f[1]), true) b.SetMessage(fmt.Sprintf("Unknown target %q", f[1]), true)
} }
} else { } else {
b.SetMessage("More info needed: 'update [target] [location]'", true) b.SetMessage("More info needed: 'delete [target] [[location]]'", true)
} }
case "set", "s": case "set", "s":
if len(f) > 2 { if len(f) > 2 {