1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00
wtf/todo/item.go
2018-04-22 21:31:02 -07:00

23 lines
252 B
Go

package todo
import (
)
type Item struct {
Checked bool
Index int
Text string
}
func (item *Item) CheckMark() string {
if item.Checked {
return "x"
} else {
return " "
}
}
func (item *Item) Toggle() {
item.Checked = !item.Checked
}