summaryrefslogtreecommitdiff
path: root/src/rhctl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rhctl')
-rw-r--r--src/rhctl/audio_switch_command.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rhctl/audio_switch_command.go b/src/rhctl/audio_switch_command.go
index 712eee0..b71cfbd 100644
--- a/src/rhctl/audio_switch_command.go
+++ b/src/rhctl/audio_switch_command.go
@@ -230,7 +230,7 @@ func SwitchCommandParseState(args []string) (cmdstr SwitchCmdString, cmdargs []i
err = fmt.Errorf("missing argument <state-type>")
return
}
- switch args[0] {
+ switch strings.ToLower(args[0]) {
case "audio":
cmdstr = SwitchCmdStateAudio
case "gpi":
@@ -255,7 +255,7 @@ func SwitchCommandParseAudio(args []string) (cmdstr SwitchCmdString, cmdargs []i
}
onum := SwitchOutputNum(0)
- if args[0] != "all" {
+ if strings.ToLower(args[0]) != "all" {
if err = onum.FromString(args[0]); err != nil {
return
}
@@ -270,7 +270,7 @@ func SwitchCommandParseAudio(args []string) (cmdstr SwitchCmdString, cmdargs []i
cmdargs = append(cmdargs, inum)
}
- switch args[1] {
+ switch strings.ToLower(args[1]) {
case "apply":
if len(args) != 3 {
err = fmt.Errorf("wrong number of arguments")
@@ -360,7 +360,7 @@ func SwitchCommandParseRelay(args []string) (cmdstr SwitchCmdString, cmdargs []i
return
}
cmdargs = append(cmdargs, num)
- switch args[1] {
+ switch strings.ToLower(args[1]) {
case "latch":
cmdstr = SwitchCmdRelayLatch
case "unlatch":
@@ -384,7 +384,7 @@ func SwitchCommandParseOC(args []string) (cmdstr SwitchCmdString, cmdargs []inte
return
}
cmdargs = append(cmdargs, num)
- switch args[1] {
+ switch strings.ToLower(args[1]) {
case "latch":
cmdstr = SwitchCmdOCLatch
case "unlatch":
@@ -400,7 +400,7 @@ func SwitchCommandParseOC(args []string) (cmdstr SwitchCmdString, cmdargs []inte
func NewSwitchCommandFromStrings(cmd string, args ...string) (c *SwitchCommand, err error) {
c = &SwitchCommand{}
- switch cmd {
+ switch strings.ToLower(cmd) {
case "state":
c.Cmd, c.Args, err = SwitchCommandParseState(args)
case "out":