diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-04-20 19:20:23 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-04-20 19:20:23 (GMT) |
commit | b1350a8096e1d7d11408b19b438ca09912e03c2d (patch) | |
tree | 457cd0da66535a2c4e6824105ad9b4874d4da908 /src/rhctl/conf.go | |
parent | 68bf38157465311e6e5bb83723c2097d1d11da58 (diff) |
selecting server should work now - needs testing!
Diffstat (limited to 'src/rhctl/conf.go')
-rw-r--r-- | src/rhctl/conf.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rhctl/conf.go b/src/rhctl/conf.go index 36a3b5a..bf68fec 100644 --- a/src/rhctl/conf.go +++ b/src/rhctl/conf.go @@ -40,6 +40,14 @@ type ConfigSwitchInputs []struct { func (p ConfigSwitchInputs) Len() int { return len(p) } func (p ConfigSwitchInputs) Swap(i, j int) { p[i], p[j] = p[j], p[i] } func (p ConfigSwitchInputs) Less(i, j int) bool { return p[i].Number < p[j].Number } +func (p ConfigSwitchInputs) Get(server, channel string) SwitchInputNum { + for _, i := range p { + if i.Server == server && i.Channel == channel { + return i.Number + } + } + return SwitchInputNum(0) +} type Config struct { Audioswitch struct { |