mirror of
https://github.com/kataras/iris.git
synced 2025-01-27 04:26:33 +01:00
25 lines
315 B
Go
25 lines
315 B
Go
|
package todo
|
||
|
|
||
|
type State uint32
|
||
|
|
||
|
const (
|
||
|
StateActive State = iota
|
||
|
StateCompleted
|
||
|
)
|
||
|
|
||
|
func ParseState(s string) State {
|
||
|
switch s {
|
||
|
case "completed":
|
||
|
return StateCompleted
|
||
|
default:
|
||
|
return StateActive
|
||
|
}
|
||
|
}
|
||
|
|
||
|
type Item struct {
|
||
|
OwnerID string
|
||
|
ID int64
|
||
|
Body string
|
||
|
CurrentState State
|
||
|
}
|