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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user