From 0a763b91d56dcd6511ee667c7df60000c5a02946 Mon Sep 17 00:00:00 2001 From: Deluan Date: Fri, 17 May 2024 21:46:59 -0400 Subject: [PATCH] Fix lint error --- .golangci.yml | 3 +++ server/subsonic/jukebox.go | 5 ----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 6f7f22d3a..59585d6bd 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -26,6 +26,9 @@ linters: - whitespace linters-settings: + govet: + enable: + - nilness gosec: excludes: - G501 diff --git a/server/subsonic/jukebox.go b/server/subsonic/jukebox.go index b49372c2b..e6ad979ff 100644 --- a/server/subsonic/jukebox.go +++ b/server/subsonic/jukebox.go @@ -78,12 +78,7 @@ func (api *Router) JukeboxControl(r *http.Request) (*responses.Subsonic, error) if err != nil { return nil, newError(responses.ErrorMissingParameter, "missing parameter index, err: %s", err) } - offset := p.IntOr("offset", 0) - if err != nil { - offset = 0 - } - return createResponse(pb.Skip(ctx, index, offset)) case ActionAdd: ids, _ := p.Strings("id")