keep validation failure messages consistent.

they now print the incorrect value passed.
This commit is contained in:
2026-02-10 01:24:55 +00:00
parent 2e1c28c909
commit 942d1b18bd
8 changed files with 9 additions and 9 deletions

View File

@@ -22,7 +22,7 @@ type MatrixCmdGroup struct {
func (cmd *MatrixCmdGroup) Validate() error {
if cmd.Index.Index < 1 || cmd.Index.Index > 6 {
return fmt.Errorf("invalid Matrix output index: %d. Valid range is 1-6", cmd.Index.Index)
return fmt.Errorf("Matrix output index must be between 1 and 6, got %d", cmd.Index.Index)
}
return nil
}
@@ -160,7 +160,7 @@ func (cmd *MatrixEqCmdGroup) Validate() error {
}
if cmd.Band.Band < 1 || cmd.Band.Band > 6 {
return fmt.Errorf("invalid EQ band number: %d. Valid range is 1-6", cmd.Band.Band)
return fmt.Errorf("EQ band number must be between 1 and 6, got %d", cmd.Band.Band)
}
return nil
}