aboutsummaryrefslogtreecommitdiffstats
path: root/bug/status.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-08-09 15:28:32 +0200
committerMichael Muré <batolettre@gmail.com>2018-08-09 15:28:32 +0200
commita0d509bcddf5ae0115c8679bbd81425696552b86 (patch)
tree1b48db8cf0cf897a4ae32e361d7c46704026c93a /bug/status.go
parent34eea1f43c0c7f386b375441d8c3a15d9d3b7c99 (diff)
downloadgit-bug-a0d509bcddf5ae0115c8679bbd81425696552b86.tar.gz
termui: display status and label changes in show bug
Diffstat (limited to 'bug/status.go')
-rw-r--r--bug/status.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/bug/status.go b/bug/status.go
index b1b066ff..0eee6cf1 100644
--- a/bug/status.go
+++ b/bug/status.go
@@ -18,3 +18,14 @@ func (s Status) String() string {
return "unknown status"
}
}
+
+func (s Status) Action() string {
+ switch s {
+ case OpenStatus:
+ return "opened"
+ case ClosedStatus:
+ return "closed"
+ default:
+ return "unknown status"
+ }
+}