Chore: use any rather than interface{} (#74066)

This commit is contained in:
Ryan McKinley
2023-08-30 18:46:47 +03:00
committed by GitHub
parent 3e272d2bda
commit 025b2f3011
525 changed files with 2528 additions and 2528 deletions
+2 -2
View File
@@ -51,9 +51,9 @@ func notAuthorized(c *contextmodel.ReqContext) {
func tokenRevoked(c *contextmodel.ReqContext, err *auth.TokenRevokedError) {
if c.IsApiRequest() {
c.JSON(401, map[string]interface{}{
c.JSON(401, map[string]any{
"message": "Token revoked",
"error": map[string]interface{}{
"error": map[string]any{
"id": "ERR_TOKEN_REVOKED",
"maxConcurrentSessions": err.MaxConcurrentSessions,
},
+1 -1
View File
@@ -236,7 +236,7 @@ func middlewareScenario(t *testing.T, desc string, fn scenarioFunc, cbs ...func(
}
} else {
t.Log("Returning JSON OK")
resp := make(map[string]interface{})
resp := make(map[string]any)
resp["message"] = "OK"
c.JSON(http.StatusOK, resp)
}
+1 -1
View File
@@ -152,7 +152,7 @@ func Recovery(cfg *setting.Cfg) web.Middleware {
}
if ctx != nil && ctx.IsApiRequest() {
resp := make(map[string]interface{})
resp := make(map[string]any)
resp["message"] = fmt.Sprintf("Internal Server Error - %s", cfg.UserFacingDefaultError)
if data.ErrorMsg != "" {
+1 -1
View File
@@ -22,7 +22,7 @@ type scenarioContext struct {
m *web.Mux
context *contextmodel.ReqContext
resp *httptest.ResponseRecorder
respJson map[string]interface{}
respJson map[string]any
handlerFunc handlerFunc
defaultHandler web.Handler
url string