Skip to content

Commit ee433eb

Browse files
authored
Merge pull request #214 from mackerelio/go1.25.0
update go directive 1.25.0
2 parents a9f5b22 + 4db4fb4 commit ee433eb

29 files changed

Lines changed: 217 additions & 217 deletions

alert_group_settings_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func TestFindAlertGroupSettings(t *testing.T) {
2121
t.Error("request method should be GET but: ", req.Method)
2222
}
2323

24-
respJSON, _ := json.Marshal(map[string][]map[string]interface{}{
24+
respJSON, _ := json.Marshal(map[string][]map[string]any{
2525
"alertGroupSettings": {
2626
{
2727
"id": "xxxxxxxxxxx",
@@ -88,7 +88,7 @@ func TestCreateAlertGroupSetting(t *testing.T) {
8888
t.Fatal("request body should be decoded as json ", string(body))
8989
}
9090

91-
respJSON, _ := json.Marshal(map[string]interface{}{
91+
respJSON, _ := json.Marshal(map[string]any{
9292
"id": "xxxxxxxxxxx",
9393
"name": alertGroupSetting.Name,
9494
"memo": alertGroupSetting.Memo,
@@ -136,7 +136,7 @@ func TestGetAlertGroupSetting(t *testing.T) {
136136
t.Error("request method should be GET but: ", req.Method)
137137
}
138138

139-
respJSON, _ := json.Marshal(map[string]interface{}{
139+
respJSON, _ := json.Marshal(map[string]any{
140140
"id": "xxxxxxxxxxx",
141141
"name": "alert group setting",
142142
"memo": "lorem ipsum...",
@@ -190,7 +190,7 @@ func TestUpdateAlertGroupSetting(t *testing.T) {
190190
t.Fatal("request body should be decoded as json ", string(body))
191191
}
192192

193-
respJSON, _ := json.Marshal(map[string]interface{}{
193+
respJSON, _ := json.Marshal(map[string]any{
194194
"id": id,
195195
"name": alertGroupSetting.Name,
196196
"memo": "lorem ipsum...",
@@ -241,7 +241,7 @@ func TestDeleteAlertGroupSetting(t *testing.T) {
241241
t.Error("request method should be DELETE but: ", req.Method)
242242
}
243243

244-
respJSON, _ := json.Marshal(map[string]interface{}{
244+
respJSON, _ := json.Marshal(map[string]any{
245245
"id": id,
246246
"name": "alert group setting",
247247
"memo": "lorem ipsum...",

alerts_test.go

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func TestFindAlerts(t *testing.T) {
1515
t.Error("request URL should be /api/v0/alerts but: ", req.URL.Path)
1616
}
1717

18-
respJSON, _ := json.Marshal(map[string][]map[string]interface{}{
18+
respJSON, _ := json.Marshal(map[string][]map[string]any{
1919
"alerts": {
2020
{
2121
"id": "2wpLU5fBXbG",
@@ -71,8 +71,8 @@ func TestFindAlertsWithNextId(t *testing.T) {
7171
t.Error("request URL should be /api/v0/alerts but: ", req.URL.Path)
7272
}
7373

74-
respJSON, _ := json.Marshal(map[string]interface{}{
75-
"alerts": []map[string]interface{}{
74+
respJSON, _ := json.Marshal(map[string]any{
75+
"alerts": []map[string]any{
7676
{
7777
"id": "2wpLU5fBXbG",
7878
"status": "CRITICAL",
@@ -136,8 +136,8 @@ func TestFindAlertsByNextId(t *testing.T) {
136136
t.Error("request Query should be /api/v/alerts?nextId=", nextID, " but: ", req.URL.RawQuery)
137137
}
138138

139-
respJSON, _ := json.Marshal(map[string]interface{}{
140-
"alerts": []map[string]interface{}{
139+
respJSON, _ := json.Marshal(map[string]any{
140+
"alerts": []map[string]any{
141141
{
142142
"id": "2fsf8jRxFG1",
143143
"status": "CRITICAL",
@@ -196,7 +196,7 @@ func TestFindWithClosedAlerts(t *testing.T) {
196196
t.Error("request URL should be /api/v0/alerts but: ", req.URL.Path)
197197
}
198198

199-
respJSON, _ := json.Marshal(map[string][]map[string]interface{}{
199+
respJSON, _ := json.Marshal(map[string][]map[string]any{
200200
"alerts": {
201201
{
202202
"id": "2wpLU5fBXbG",
@@ -270,8 +270,8 @@ func TestFindWithClosedAlertsByNextId(t *testing.T) {
270270
t.Error("request withClosed should be true but: ", q.Get("withClosed"))
271271
}
272272

273-
respJSON, _ := json.Marshal(map[string]interface{}{
274-
"alerts": []map[string]interface{}{
273+
respJSON, _ := json.Marshal(map[string]any{
274+
"alerts": []map[string]any{
275275
{
276276
"id": "2wpLU5fBXbG",
277277
"status": "CRITICAL",
@@ -346,7 +346,7 @@ func TestGetAlert(t *testing.T) {
346346
t.Error("request method should be GET but: ", req.Method)
347347
}
348348

349-
respJSON, _ := json.Marshal(map[string]interface{}{
349+
respJSON, _ := json.Marshal(map[string]any{
350350
"id": "2wpLU5fBXbG",
351351
"status": "CRITICAL",
352352
"monitorId": "2cYjfibBkaj",
@@ -393,18 +393,18 @@ func TestFindAlertLogs(t *testing.T) {
393393
t.Error("request method should be GET but: ", req.Method)
394394
}
395395

396-
respJSON, _ := json.Marshal(map[string]interface{}{
397-
"logs": []map[string]interface{}{
396+
respJSON, _ := json.Marshal(map[string]any{
397+
"logs": []map[string]any{
398398
{
399399
"id": "5m7fewuu5tS",
400400
"createdAt": 1735290407,
401401
"status": "WARNING",
402402
"trigger": "monitoring",
403403
"monitorId": "5m72DB7s7sU",
404404
"targetValue": (*float64)(nil),
405-
"statusDetail": map[string]interface{}{
405+
"statusDetail": map[string]any{
406406
"type": "check",
407-
"detail": map[string]interface{}{
407+
"detail": map[string]any{
408408
"message": "Uptime WARNING: 0 day(s) 0 hour(s) 6 minute(s) (398 second(s))",
409409
"memo": "",
410410
},
@@ -502,18 +502,18 @@ func TestFindAlertLogsWithOption(t *testing.T) {
502502
t.Error("request method should be GET but: ", req.Method)
503503
}
504504

505-
respJSON, _ := json.Marshal(map[string]interface{}{
506-
"logs": []map[string]interface{}{
505+
respJSON, _ := json.Marshal(map[string]any{
506+
"logs": []map[string]any{
507507
{
508508
"id": "5m7fewuu5tS",
509509
"createdAt": 1735290407,
510510
"status": "WARNING",
511511
"trigger": "monitoring",
512512
"monitorId": "5m72DB7s7sU",
513513
"targetValue": (*float64)(nil),
514-
"statusDetail": map[string]interface{}{
514+
"statusDetail": map[string]any{
515515
"type": "check",
516-
"detail": map[string]interface{}{
516+
"detail": map[string]any{
517517
"message": "Uptime WARNING: 0 day(s) 0 hour(s) 6 minute(s) (398 second(s))",
518518
"memo": "",
519519
},

apm_test.go

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ func TestListHTTPServerStats(t *testing.T) {
4444
t.Error("request query 'perPage' param should be 20 but: ", query.Get("perPage"))
4545
}
4646

47-
respJSON, _ := json.Marshal(map[string]interface{}{
48-
"results": []map[string]interface{}{
47+
respJSON, _ := json.Marshal(map[string]any{
48+
"results": []map[string]any{
4949
{
5050
"method": "GET",
5151
"route": "/api/users",
@@ -148,8 +148,8 @@ func TestListHTTPServerStatsWithMinimalParams(t *testing.T) {
148148
t.Error("request query 'to' param should be 2000000000 but: ", query.Get("to"))
149149
}
150150

151-
respJSON, _ := json.Marshal(map[string]interface{}{
152-
"results": []map[string]interface{}{},
151+
respJSON, _ := json.Marshal(map[string]any{
152+
"results": []map[string]any{},
153153
"hasNextPage": false,
154154
})
155155

@@ -200,8 +200,8 @@ func TestListHTTPServerStatsContext(t *testing.T) {
200200
t.Error("request query 'to' param should be 1234567900 but: ", query.Get("to"))
201201
}
202202

203-
respJSON, _ := json.Marshal(map[string]interface{}{
204-
"results": []map[string]interface{}{
203+
respJSON, _ := json.Marshal(map[string]any{
204+
"results": []map[string]any{
205205
{
206206
"method": "GET",
207207
"route": "/api/users",
@@ -259,8 +259,8 @@ func TestListHTTPServerStatsContext(t *testing.T) {
259259
func TestListHTTPServerStatsContextWithTimeout(t *testing.T) {
260260
ts := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {
261261
time.Sleep(100 * time.Millisecond)
262-
respJSON, _ := json.Marshal(map[string]interface{}{
263-
"results": []map[string]interface{}{},
262+
respJSON, _ := json.Marshal(map[string]any{
263+
"results": []map[string]any{},
264264
"hasNextPage": false,
265265
})
266266
res.Header()["Content-Type"] = []string{"application/json"}
@@ -287,8 +287,8 @@ func TestListHTTPServerStatsContextWithTimeout(t *testing.T) {
287287
func TestListHTTPServerStatsContextWithCancel(t *testing.T) {
288288
ts := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {
289289
time.Sleep(100 * time.Millisecond)
290-
respJSON, _ := json.Marshal(map[string]interface{}{
291-
"results": []map[string]interface{}{},
290+
respJSON, _ := json.Marshal(map[string]any{
291+
"results": []map[string]any{},
292292
"hasNextPage": false,
293293
})
294294
res.Header()["Content-Type"] = []string{"application/json"}
@@ -348,8 +348,8 @@ func TestListDbQueryStats(t *testing.T) {
348348
t.Error("request query 'perPage' param should be 20 but: ", query.Get("perPage"))
349349
}
350350

351-
respJSON, _ := json.Marshal(map[string]interface{}{
352-
"results": []map[string]interface{}{
351+
respJSON, _ := json.Marshal(map[string]any{
352+
"results": []map[string]any{
353353
{
354354
"query": "SELECT * FROM users WHERE id = ?",
355355
"executionCount": 1250,
@@ -444,8 +444,8 @@ func TestListDbQueryStatsWithMinimalParams(t *testing.T) {
444444
t.Error("request query 'to' param should be 2000000000 but: ", query.Get("to"))
445445
}
446446

447-
respJSON, _ := json.Marshal(map[string]interface{}{
448-
"results": []map[string]interface{}{},
447+
respJSON, _ := json.Marshal(map[string]any{
448+
"results": []map[string]any{},
449449
"hasNextPage": false,
450450
})
451451

@@ -496,8 +496,8 @@ func TestListDbQueryStatsContext(t *testing.T) {
496496
t.Error("request query 'to' param should be 1234567900 but: ", query.Get("to"))
497497
}
498498

499-
respJSON, _ := json.Marshal(map[string]interface{}{
500-
"results": []map[string]interface{}{
499+
respJSON, _ := json.Marshal(map[string]any{
500+
"results": []map[string]any{
501501
{
502502
"query": "SELECT * FROM users WHERE id = ?",
503503
"executionCount": 1250,
@@ -551,8 +551,8 @@ func TestListDbQueryStatsContext(t *testing.T) {
551551
func TestListDbQueryStatsContextWithTimeout(t *testing.T) {
552552
ts := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {
553553
time.Sleep(100 * time.Millisecond)
554-
respJSON, _ := json.Marshal(map[string]interface{}{
555-
"results": []map[string]interface{}{},
554+
respJSON, _ := json.Marshal(map[string]any{
555+
"results": []map[string]any{},
556556
"hasNextPage": false,
557557
})
558558
res.Header()["Content-Type"] = []string{"application/json"}
@@ -579,8 +579,8 @@ func TestListDbQueryStatsContextWithTimeout(t *testing.T) {
579579
func TestListDbQueryStatsContextWithCancel(t *testing.T) {
580580
ts := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {
581581
time.Sleep(100 * time.Millisecond)
582-
respJSON, _ := json.Marshal(map[string]interface{}{
583-
"results": []map[string]interface{}{},
582+
respJSON, _ := json.Marshal(map[string]any{
583+
"results": []map[string]any{},
584584
"hasNextPage": false,
585585
})
586586
res.Header()["Content-Type"] = []string{"application/json"}

aws_integrations_test.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func TestFindAWSIntegrations(t *testing.T) {
2020
t.Error("request method should be GET but: ", req.Method)
2121
}
2222

23-
respJSON, _ := json.Marshal(map[string][]map[string]interface{}{
23+
respJSON, _ := json.Marshal(map[string][]map[string]any{
2424
"aws_integrations": {
2525
{
2626
"id": "9rxGOHfVF8F",
@@ -32,7 +32,7 @@ func TestFindAWSIntegrations(t *testing.T) {
3232
"region": "ap-northeast-1",
3333
"includedTags": "Name:web-server,Environment:staging,Product:web",
3434
"excludedTags": "Name:test-server,Environment:staging,Product:test",
35-
"services": map[string]map[string]interface{}{
35+
"services": map[string]map[string]any{
3636
"EC2": {
3737
"enable": true,
3838
"role": "web-group",
@@ -61,7 +61,7 @@ func TestFindAWSIntegrations(t *testing.T) {
6161
"region": "eu-central-1",
6262
"includedTags": "Name:web-server,Environment:staging,Product:web",
6363
"excludedTags": "Name:test-server,Environment:staging,Product:test",
64-
"services": map[string]map[string]interface{}{
64+
"services": map[string]map[string]any{
6565
"EC2": {
6666
"enable": false,
6767
"role": (*string)(nil),
@@ -130,7 +130,7 @@ func TestFindAWSIntegration(t *testing.T) {
130130
t.Error("request method should be GET but: ", req.Method)
131131
}
132132

133-
respJSON, _ := json.Marshal(map[string]interface{}{
133+
respJSON, _ := json.Marshal(map[string]any{
134134
"id": "9rxGOHfVF8F",
135135
"name": "my-aws-integrations-1",
136136
"memo": "my-aws-integrations-1",
@@ -140,7 +140,7 @@ func TestFindAWSIntegration(t *testing.T) {
140140
"region": "ap-northeast-1",
141141
"includedTags": "Name:web-server,Environment:staging,Product:web",
142142
"excludedTags": "Name:test-server,Environment:staging,Product:test",
143-
"services": map[string]map[string]interface{}{
143+
"services": map[string]map[string]any{
144144
"EC2": {
145145
"enable": true,
146146
"role": "web-group",
@@ -218,7 +218,7 @@ func TestCreateAWSIntegration(t *testing.T) {
218218
t.Errorf("Wrong data for aws integration services: %v", awsIntegration.Services["EC2"])
219219
}
220220

221-
respJSON, _ := json.Marshal(map[string]interface{}{
221+
respJSON, _ := json.Marshal(map[string]any{
222222
"id": "9rxGOHfVF8F",
223223
"name": "my-aws-integrations-1",
224224
"memo": "my-aws-integrations-1",
@@ -229,7 +229,7 @@ func TestCreateAWSIntegration(t *testing.T) {
229229
"region": "ap-northeast-1",
230230
"includedTags": "Name:web-server,Environment:staging,Product:web",
231231
"excludedTags": "Name:test-server,Environment:staging,Product:test",
232-
"services": map[string]map[string]interface{}{
232+
"services": map[string]map[string]any{
233233
"EC2": {
234234
"enable": true,
235235
"role": "web-group",
@@ -339,7 +339,7 @@ func TestUpdateAWSIntegration(t *testing.T) {
339339
t.Errorf("Wrong data for aws integration services: %v", awsIntegration.Services["EC2"])
340340
}
341341

342-
respJSON, _ := json.Marshal(map[string]interface{}{
342+
respJSON, _ := json.Marshal(map[string]any{
343343
"id": "9rxGOHfVF8F",
344344
"name": "my-aws-integrations-1",
345345
"memo": "my-aws-integrations-1",
@@ -350,7 +350,7 @@ func TestUpdateAWSIntegration(t *testing.T) {
350350
"region": "ap-northeast-1",
351351
"includedTags": "Name:web-server,Environment:staging,Product:web",
352352
"excludedTags": "Name:test-server,Environment:staging,Product:test",
353-
"services": map[string]map[string]interface{}{
353+
"services": map[string]map[string]any{
354354
"EC2": {
355355
"enable": true,
356356
"role": "web-group",
@@ -438,7 +438,7 @@ func TestDeleteAWSIntegration(t *testing.T) {
438438
t.Error("request method should be DELETE but: ", req.Method)
439439
}
440440

441-
respJSON, _ := json.Marshal(map[string]interface{}{
441+
respJSON, _ := json.Marshal(map[string]any{
442442
"id": "9rxGOHfVF8F",
443443
"name": "my-aws-integrations-1",
444444
"memo": "my-aws-integrations-1",
@@ -448,7 +448,7 @@ func TestDeleteAWSIntegration(t *testing.T) {
448448
"region": "ap-northeast-1",
449449
"includedTags": "Name:web-server,Environment:staging,Product:web",
450450
"excludedTags": "Name:test-server,Environment:staging,Product:test",
451-
"services": map[string]map[string]interface{}{
451+
"services": map[string]map[string]any{
452452
"EC2": {
453453
"enable": true,
454454
"role": "web-group",

0 commit comments

Comments
 (0)