mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-15 10:12:06 +03:00
32 lines
405 B
Go
32 lines
405 B
Go
package bug
|
|
|
|
type Status int
|
|
|
|
const (
|
|
_ Status = iota
|
|
OpenStatus
|
|
ClosedStatus
|
|
)
|
|
|
|
func (s Status) String() string {
|
|
switch s {
|
|
case OpenStatus:
|
|
return "open"
|
|
case ClosedStatus:
|
|
return "closed"
|
|
default:
|
|
return "unknown status"
|
|
}
|
|
}
|
|
|
|
func (s Status) Action() string {
|
|
switch s {
|
|
case OpenStatus:
|
|
return "opened"
|
|
case ClosedStatus:
|
|
return "closed"
|
|
default:
|
|
return "unknown status"
|
|
}
|
|
}
|