From 25a43dce1a7bef23dfce3d922841f7aa501ea9e7 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 24 Sep 2016 19:48:26 +0200 Subject: added marshaller for mood 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 -- cgit v0.10.2