modernize the codebase

Run the modernize linter across the codebase.
Change generated by running:

```
go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./...
```

Ref:
https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize
This commit is contained in:
2025-09-23 09:13:29 +03:30
parent fc1502c4a0
commit 94694741a7
5 changed files with 33 additions and 38 deletions
+3 -7
View File
@@ -8,6 +8,7 @@ import (
"fmt"
"math/rand"
"net/http"
"slices"
"strings"
"gorm.io/gorm"
@@ -163,10 +164,5 @@ func (ps *PostService) GetMedia() domain.MediaAttachment {
}
func arrayContains(arr []string, str string) bool {
for _, a := range arr {
if a == str {
return true
}
}
return false
}
return slices.Contains(arr, str)
}