Fix golangci-lint findings and improve code quality

Move example files to separate packages to avoid main redeclaration. Fix cyclomatic complexity and variable shadowing. Address errcheck and wsl linting issues. Update tests to handle capabilities and fix panics. Apply consistent formatting with gofmt.
This commit is contained in:
Tobias Gesellchen
2026-01-11 00:39:58 +01:00
parent 1f47c763dc
commit 369ebc42fe
11 changed files with 388 additions and 161 deletions
+3
View File
@@ -1075,6 +1075,7 @@ func (c *Client) GetAudioDSPControls() (*models.AudioDSPControls, error) {
}
var dspControls models.AudioDSPControls
err = c.get("/audiodspcontrols", &dspControls)
return &dspControls, err
@@ -1146,6 +1147,7 @@ func (c *Client) GetAudioProductToneControls() (*models.AudioProductToneControls
}
var toneControls models.AudioProductToneControls
err = c.get("/audioproducttonecontrols", &toneControls)
return &toneControls, err
@@ -1199,6 +1201,7 @@ func (c *Client) GetAudioProductLevelControls() (*models.AudioProductLevelContro
}
var levelControls models.AudioProductLevelControls
err = c.get("/audioproductlevelcontrols", &levelControls)
return &levelControls, err