fix: resolve whitespace (wsl_v5) issues - part 1

- Fix whitespace issues in cmd files (example-mdns, example-upnp, soundtouch-cli, websocket-demo)
- Fix whitespace issues in client.go and websocket.go
- Fix whitespace issues in test files
- Restore accidentally removed deviceHost variable
- Add proper spacing around loops, conditionals, and function calls

Progress: Continuing to resolve remaining wsl_v5 linting issues
This commit is contained in:
Tobias Gesellchen
2026-01-09 23:07:32 +01:00
parent 9ed8182278
commit 8d047bec78
9 changed files with 41 additions and 3 deletions
+3
View File
@@ -248,6 +248,7 @@ func (c *Client) VolumeDown() error {
// SelectPreset sends a preset key command (1-6)
func (c *Client) SelectPreset(presetNumber int) error {
var keyValue string
switch presetNumber {
case 1:
keyValue = models.KeyPreset1
@@ -648,6 +649,7 @@ func (c *Client) get(endpoint string, result interface{}) error {
if err != nil {
return fmt.Errorf("failed to execute request: %w", err)
}
defer func() {
if closeErr := resp.Body.Close(); closeErr != nil {
// Log the error but don't override the main error
@@ -704,6 +706,7 @@ func (c *Client) post(endpoint string, payload, result interface{}) error {
if err != nil {
return fmt.Errorf("failed to execute request: %w", err)
}
defer func() {
if closeErr := resp.Body.Close(); closeErr != nil {
// Log the error but don't override the main error