summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rhctl/switch_control.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/rhctl/switch_control.go b/src/rhctl/switch_control.go
index 5645511..2533394 100644
--- a/src/rhctl/switch_control.go
+++ b/src/rhctl/switch_control.go
@@ -52,6 +52,21 @@ func (m Mood) String() string {
return "unknown"
}
+func (m Mood) MarshalText() (data []byte, err error) {
+ data = []byte(m.String())
+ return
+}
+
+func (m Mood) MarshalJSON() (data []byte, err error) {
+ data = []byte(m.String())
+ return
+}
+
+func (m Mood) MarshalTOML() (data []byte, err error) {
+ data = []byte(m.String())
+ return
+}
+
type State struct {
Mood Mood
Switch SwitchState