mirror of
https://github.com/onyx-and-iris/xair-cli.git
synced 2026-02-26 00:09:11 +00:00
fixes bug where strip/bus eq on would try to validate the band number.
This commit is contained in:
parent
128f0c1df6
commit
8fc5a55eff
4
bus.go
4
bus.go
@ -3,6 +3,8 @@ package main
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/alecthomas/kong"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BusCmdGroup struct {
|
type BusCmdGroup struct {
|
||||||
@ -168,7 +170,7 @@ type BusEqCmdGroup struct {
|
|||||||
} `help:"Commands for controlling a specific EQ band of the bus." arg:""`
|
} `help:"Commands for controlling a specific EQ band of the bus." arg:""`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cmd *BusEqCmdGroup) Validate() error {
|
func (cmd *BusEqCmdGroup) Validate(ctx kong.Context) error {
|
||||||
if cmd.Band.Band < 1 || cmd.Band.Band > 6 {
|
if cmd.Band.Band < 1 || cmd.Band.Band > 6 {
|
||||||
return fmt.Errorf("EQ band number must be between 1 and 6")
|
return fmt.Errorf("EQ band number must be between 1 and 6")
|
||||||
}
|
}
|
||||||
|
|||||||
4
strip.go
4
strip.go
@ -3,6 +3,8 @@ package main
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/alecthomas/kong"
|
||||||
)
|
)
|
||||||
|
|
||||||
type StripCmdGroup struct {
|
type StripCmdGroup struct {
|
||||||
@ -343,7 +345,7 @@ type StripEqCmdGroup struct {
|
|||||||
} `help:"Commands for controlling a specific EQ band of the strip." arg:""`
|
} `help:"Commands for controlling a specific EQ band of the strip." arg:""`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cmd *StripEqCmdGroup) Validate() error {
|
func (cmd *StripEqCmdGroup) Validate(ctx kong.Context) error {
|
||||||
if cmd.Band.Band < 1 || cmd.Band.Band > 4 {
|
if cmd.Band.Band < 1 || cmd.Band.Band > 4 {
|
||||||
return fmt.Errorf("EQ band number must be between 1 and 4")
|
return fmt.Errorf("EQ band number must be between 1 and 4")
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user