fix: resolve unparam issues by using constants for default ports

- Added defaultSoundTouchPort constant (8090) to client.go
- Updated parseBassHostPort and parseHostPort test utility functions to use constant
- Removed unnecessary defaultPort parameters that always received 8090
- Fixed function signatures and all call sites in integration tests

Progress: Reduced unparam issues from 3 to 1 (only client.go post method remains)
Total issues: 23 → 21 (9% improvement)

Remaining:
- gocyclo: 14 (complexity)
- revive: 1 (DiscoveryService naming)
- staticcheck: 5
- unparam: 1 (client.post result parameter - kept for future extensibility)
This commit is contained in:
Tobias Gesellchen
2026-01-09 23:19:56 +01:00
parent 9ce5948eae
commit c656717262
4 changed files with 22 additions and 19 deletions
+3
View File
@@ -12,6 +12,9 @@ import (
"github.com/user_account/bose-soundtouch/pkg/models"
)
// defaultSoundTouchPort is the standard port for SoundTouch devices
const defaultSoundTouchPort = 8090
// Client represents a SoundTouch API client
type Client struct {
baseURL string