style: fix whitespace and wsl_v5 linting issues

- Remove unnecessary trailing/leading whitespace
- Add missing whitespace above return statements, if statements, and loops
- Fix whitespace around variable declarations and assignments
- Improve code readability by following Go whitespace conventions
- Maintain functionality while improving code style consistency

Addresses majority of wsl_v5 and whitespace linting rules.
This commit is contained in:
Tobias Gesellchen
2026-02-01 21:56:13 +01:00
parent 7f6eccee39
commit a74dc96e50
11 changed files with 40 additions and 10 deletions
-1
View File
@@ -288,7 +288,6 @@ func ExampleClient_GetCapabilities() {
func ExampleClient_GetSupportedURLs_concept() {
// Example of how to use GetSupportedURLs() method
// Note: This example shows the concept but doesn't execute to avoid requiring a real device
config := &client.Config{Host: "192.168.1.100"}
c := client.NewClient(config)
@@ -21,6 +21,7 @@ func TestClient_Navigation_Integration(t *testing.T) {
// Parse host:port if provided
var finalHost string
var finalPort int
if strings.Contains(host, ":") {
parts := strings.Split(host, ":")
@@ -153,6 +154,7 @@ func TestClient_StationManagement_Integration(t *testing.T) {
// Parse host:port if provided
var finalHost string
var finalPort int
if strings.Contains(host, ":") {
parts := strings.Split(host, ":")
@@ -185,6 +187,7 @@ func TestClient_StationManagement_Integration(t *testing.T) {
for _, source := range sources.SourceItem {
if source.Source == "PANDORA" && source.Status.IsReady() {
pandoraAccount = source.SourceAccount
break
}
}
@@ -207,6 +210,7 @@ func TestClient_StationManagement_Integration(t *testing.T) {
// Try to find an artist or station result to add
var tokenToAdd string
var nameToAdd string
artists := searchResponse.GetArtists()
@@ -241,13 +245,16 @@ func TestClient_StationManagement_Integration(t *testing.T) {
}
var testSource string
var testAccount string
// Look for STORED_MUSIC as it typically has containers
for _, source := range sources.SourceItem {
if source.Source == "STORED_MUSIC" && source.Status.IsReady() {
testSource = source.Source
testAccount = source.SourceAccount
break
}
}
-4
View File
@@ -254,7 +254,6 @@ func TestClient_NavigateContainer(t *testing.T) {
}
client := NewClient(config)
client.baseURL = server.URL
response, err := client.NavigateContainer("STORED_MUSIC", "device123/0", 1, 1000, containerItem)
if err != nil {
@@ -546,7 +545,6 @@ func TestClient_GetPandoraStations(t *testing.T) {
}
client := NewClient(config)
client.baseURL = server.URL
response, err := client.GetPandoraStations("user123")
if err != nil {
@@ -835,7 +833,6 @@ func TestClient_SearchPandoraStations(t *testing.T) {
}
client := NewClient(config)
client.baseURL = server.URL
response, err := client.SearchPandoraStations("user123", "Taylor Swift")
if err != nil {
@@ -922,7 +919,6 @@ func TestClient_SearchSpotifyContent(t *testing.T) {
}
client := NewClient(config)
client.baseURL = server.URL
response, err := client.SearchSpotifyContent("user@example.com", "Queen")
if err != nil {