mirror of
https://github.com/kataras/iris.git
synced 2025-01-26 03:56:34 +01:00
0b2dcc76f5
Former-commit-id: 994f00952352c93d270ad197cb843f3222fb37c0
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
|
|
}
|