Replacing interface{} with any everywhere (except generated mocks) (#29446)

Этот коммит содержится в:
Jesús Espino
2024-12-15 21:11:36 +01:00
коммит произвёл GitHub
родитель a21d470bee
Коммит d316df6d28
34 изменённых файлов: 96 добавлений и 96 удалений

Просмотреть файл

@@ -1774,7 +1774,7 @@ func addChannelMember(c *Context, w http.ResponseWriter, r *http.Request) {
props := model.StringInterfaceFromJSON(r.Body)
var userIds []string
interfaceIds, ok := props["user_ids"].([]interface{})
interfaceIds, ok := props["user_ids"].([]any)
if ok {
if len(interfaceIds) > maxListSize {
c.SetInvalidParam("user_ids")

Просмотреть файл

@@ -401,8 +401,8 @@ func queryLogs(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
logsJSON := make(map[string][]interface{})
var result interface{}
logsJSON := make(map[string][]any)
var result any
for node, logLines := range logs {
for _, log := range logLines {
err = json.Unmarshal([]byte(log), &result)