chore(deps)!: bump to go1.25

fixes #594

Release-As: 0.18.0
This commit is contained in:
sentriz
2025-09-06 23:38:04 +01:00
parent db97bc753e
commit 1bf4a5b0c1
18 changed files with 45 additions and 63 deletions

No files matched your search

+1 -1
View File
@@ -271,7 +271,7 @@ func respRaw(h http.HandlerFunc) http.Handler {
type templateData struct {
// common
Flashes []interface{}
Flashes []any
User *db.User
Version string
-1
View File
@@ -87,7 +87,6 @@ func makeHTTPMockWithAdmin(query url.Values) (*httptest.ResponseRecorder, *http.
func runQueryCases(t *testing.T, h handlerSubsonic, cases []*queryCase) {
t.Helper()
for _, qc := range cases {
qc := qc
t.Run(qc.expectPath, func(t *testing.T) {
t.Helper()
t.Parallel()
+2 -4
View File
@@ -155,11 +155,9 @@ func coverScaleAndSave(reader io.Reader, cachePath string, size int) error {
if err != nil {
return fmt.Errorf("resizing: %w", err)
}
width := size
if width > src.Bounds().Dx() {
width := min(size,
// don't upscale images
width = src.Bounds().Dx()
}
src.Bounds().Dx())
if err := imaging.Save(imaging.Resize(src, width, 0, imaging.Lanczos), cachePath); err != nil {
return fmt.Errorf("caching %q: %w", cachePath, err)
}
+3 -4
View File
@@ -27,6 +27,7 @@ package params
import (
"errors"
"maps"
"net/http"
"net/url"
"strconv"
@@ -44,9 +45,7 @@ func New(r *http.Request) Params {
params := r.URL.Query()
// also if there's any in the post body, use those too
if err := r.ParseForm(); err == nil {
for k, v := range r.Form {
params[k] = v
}
maps.Copy(params, r.Form)
}
return Params(params)
}
@@ -389,7 +388,7 @@ func parseTime(in string) (time.Time, error) {
return time.Unix(0, ns), nil
}
func parse(values []string, i interface{}) error {
func parse(values []string, i any) error {
if len(values) == 0 {
return ErrNoValues
}
+3 -3
View File
@@ -102,7 +102,7 @@ type Error struct {
Message string `xml:"message,attr" json:"message"`
}
func NewError(code int, message string, a ...interface{}) *Response {
func NewError(code int, message string, a ...any) *Response {
r := NewResponse()
r.Status = "failed"
r.Error = &Error{
@@ -128,7 +128,7 @@ type GenreRef struct {
// https://opensubsonic.netlify.app/docs/responses/albumid3/
type Album struct {
ID *specid.ID `xml:"id,attr,omitempty" json:"id"`
Created time.Time `xml:"created,attr,omitempty" json:"created,omitempty"`
Created time.Time `xml:"created,attr,omitempty" json:"created"`
// legacy or single tag mode
ArtistID *specid.ID `xml:"artistId,attr,omitempty" json:"artistId,omitempty"`
@@ -201,7 +201,7 @@ type TrackChild struct {
Bitrate int `xml:"bitRate,attr,omitempty" json:"bitRate,omitempty"`
ContentType string `xml:"contentType,attr,omitempty" json:"contentType,omitempty"`
CoverID *specid.ID `xml:"coverArt,attr,omitempty" json:"coverArt,omitempty"`
CreatedAt time.Time `xml:"created,attr,omitempty" json:"created,omitempty"`
CreatedAt time.Time `xml:"created,attr,omitempty" json:"created"`
Duration int `xml:"duration,attr,omitempty" json:"duration,omitempty"`
Genre string `xml:"genre,attr,omitempty" json:"genre,omitempty"`
Genres []*GenreRef `xml:"genres,omitempty" json:"genres,omitempty"`
-1
View File
@@ -24,7 +24,6 @@ func TestParseID(t *testing.T) {
}
for _, tcase := range tcases {
tcase := tcase // pin
t.Run(tcase.param, func(t *testing.T) {
t.Parallel()