Replacing interface{} with any everywhere (except generated mocks) (#29446)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a21d470bee
Коммит
d316df6d28
@@ -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)
|
||||
|
||||
Ссылка в новой задаче
Block a user