diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-09-24 17:48:26 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-09-24 17:48:26 (GMT) |
commit | 25a43dce1a7bef23dfce3d922841f7aa501ea9e7 (patch) | |
tree | 3eea8b8723f3348496f8113c315d548257334df3 | |
parent | 031ed467802392b4a43f6c88ef66e15592016b9c (diff) |
added marshaller for mood
-rw-r--r-- | src/rhctl/switch_control.go | 15 |
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 |