refactor: run Go modernize (#5002)

This commit is contained in:
Maximilian
2026-02-08 08:57:30 -06:00
committed by GitHub
parent 408aa78ed5
commit a704e86ac1
102 changed files with 322 additions and 352 deletions
+3 -3
View File
@@ -39,7 +39,7 @@ func serveIndex(ds model.DataStore, fs fs.FS, shareInfo *model.Share) http.Handl
http.NotFound(w, r)
return
}
appConfig := map[string]interface{}{
appConfig := map[string]any{
"version": consts.Version,
"firstTime": firstTime,
"variousArtistsId": consts.VariousArtistsID,
@@ -95,7 +95,7 @@ func serveIndex(ds model.DataStore, fs fs.FS, shareInfo *model.Share) http.Handl
if version != "dev" {
version = "v" + version
}
data := map[string]interface{}{
data := map[string]any{
"AppConfig": string(appConfigJson),
"Version": version,
}
@@ -145,7 +145,7 @@ type shareTrack struct {
Duration float32 `json:"duration,omitempty"`
}
func addShareData(r *http.Request, data map[string]interface{}, shareInfo *model.Share) {
func addShareData(r *http.Request, data map[string]any, shareInfo *model.Share) {
ctx := r.Context()
if shareInfo == nil || shareInfo.ID == "" {
return