Fix lint error
This commit is contained in:
@@ -26,6 +26,9 @@ linters:
|
|||||||
- whitespace
|
- whitespace
|
||||||
|
|
||||||
linters-settings:
|
linters-settings:
|
||||||
|
govet:
|
||||||
|
enable:
|
||||||
|
- nilness
|
||||||
gosec:
|
gosec:
|
||||||
excludes:
|
excludes:
|
||||||
- G501
|
- G501
|
||||||
|
|||||||
@@ -78,12 +78,7 @@ func (api *Router) JukeboxControl(r *http.Request) (*responses.Subsonic, error)
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, newError(responses.ErrorMissingParameter, "missing parameter index, err: %s", err)
|
return nil, newError(responses.ErrorMissingParameter, "missing parameter index, err: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
offset := p.IntOr("offset", 0)
|
offset := p.IntOr("offset", 0)
|
||||||
if err != nil {
|
|
||||||
offset = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
return createResponse(pb.Skip(ctx, index, offset))
|
return createResponse(pb.Skip(ctx, index, offset))
|
||||||
case ActionAdd:
|
case ActionAdd:
|
||||||
ids, _ := p.Strings("id")
|
ids, _ := p.Strings("id")
|
||||||
|
|||||||
Reference in New Issue
Block a user