summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-04-18 22:17:10 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-04-18 22:17:10 (GMT)
commitb9975f025a7dd3ba4fcfde03be9176618ef9aa5b (patch)
treed08171f8769dfef530e5a07ba5ee06f2a2127dca /src
parent3e407753f61cba0431312511998f31972caaa744 (diff)
improved audio switch port config
Diffstat (limited to 'src')
-rw-r--r--src/rhctl/audio_switch_command.go4
-rw-r--r--src/rhctl/conf.go5
2 files changed, 7 insertions, 2 deletions
diff --git a/src/rhctl/audio_switch_command.go b/src/rhctl/audio_switch_command.go
index 3c67b3c..1c2e2fb 100644
--- a/src/rhctl/audio_switch_command.go
+++ b/src/rhctl/audio_switch_command.go
@@ -76,6 +76,10 @@ func (i *SwitchInputNum) FromString(str string) error {
return nil
}
+func (i *SwitchInputNum) UnmarshalTOML(data []byte) error {
+ return i.FromString(string(data))
+}
+
type SwitchOutputNum uint
func (o SwitchOutputNum) String() string {
diff --git a/src/rhctl/conf.go b/src/rhctl/conf.go
index b6f21ca..77ab174 100644
--- a/src/rhctl/conf.go
+++ b/src/rhctl/conf.go
@@ -36,8 +36,9 @@ type Config struct {
Timeout Duration `toml:"timeout"`
Unit SwitchUnitID `toml:"unit"`
Ports []struct {
- Name string `toml:"name"`
- Number uint `toml:"number"`
+ Server string `toml:"server"`
+ Channel string `toml:"channel"`
+ Number SwitchInputNum `toml:"number"`
}
}