mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 08:36:13 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user