Skip to content

Commit a2d90ec

Browse files
chore(deps): update dependency go to v1.26.0 (#2195)
* chore(deps): update dependency go to v1.26.0 * chore: update checksums * refactor: replace githubv4.NewString and github.Ptr with new ``` + golangci-lint run pkg/notifier/github/comment.go:101:33: newexpr: call of NewString(x) can be simplified to new(x) (modernize) variables["commentsCursor"] = githubv4.NewString(q.Repository.Issue.Comments.PageInfo.EndCursor) ^ pkg/notifier/github/comment.go:137:33: newexpr: call of NewString(x) can be simplified to new(x) (modernize) variables["commentsCursor"] = githubv4.NewString(q.Repository.PullRequest.Comments.PageInfo.EndCursor) ^ pkg/notifier/github/github_test.go:60:11: newexpr: call of Ptr(x) can be simplified to new(x) (modernize) ID: github.Ptr(int64(371748792)), ^ pkg/notifier/github/github_test.go:61:11: newexpr: call of Ptr(x) can be simplified to new(x) (modernize) Body: github.Ptr("comment 1"), ^ pkg/notifier/github/github_test.go:67:12: newexpr: call of Ptr(x) can be simplified to new(x) (modernize) ID: github.Ptr(int64(371748792)), ^ 5 issues: * modernize: 5 exit status 1 ``` --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Shunsuke Suzuki <suzuki-shunsuke@users.noreply.github.com> Co-authored-by: Shunsuke Suzuki <suzuki.shunsuke.1989@gmail.com>
1 parent 8f29171 commit a2d90ec

File tree

4 files changed

+33
-33
lines changed

4 files changed

+33
-33
lines changed

aqua/aqua-checksums.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -281,33 +281,33 @@
281281
"algorithm": "sha256"
282282
},
283283
{
284-
"id": "http/golang.org/dl/go1.25.7.darwin-amd64.tar.gz",
285-
"checksum": "BF5050A2152F4053837B886E8D9640C829DBACBC3370F913351EB0904CB706F5",
284+
"id": "http/golang.org/dl/go1.26.0.darwin-amd64.tar.gz",
285+
"checksum": "1CA28B7703CBEA05A65B2A1D92D6B308610EF92F8824578A0874F2E60C9D5A22",
286286
"algorithm": "sha256"
287287
},
288288
{
289-
"id": "http/golang.org/dl/go1.25.7.darwin-arm64.tar.gz",
290-
"checksum": "FF18369FFAD05C57D5BED888B660B31385F3C913670A83EF557CDFD98EA9AE1B",
289+
"id": "http/golang.org/dl/go1.26.0.darwin-arm64.tar.gz",
290+
"checksum": "B1640525DFE68F066D56F200BEF7BF4DCE955A1A893BD061DE6754C211431023",
291291
"algorithm": "sha256"
292292
},
293293
{
294-
"id": "http/golang.org/dl/go1.25.7.linux-amd64.tar.gz",
295-
"checksum": "12E6D6A191091AE27DC31F6EFC630E3A3B8BA409BAF3573D955B196FDF086005",
294+
"id": "http/golang.org/dl/go1.26.0.linux-amd64.tar.gz",
295+
"checksum": "AAC1B08A0FB0C4E0A7C1555BEB7B59180B05DFC5A3D62E40E9DE90CD42F88235",
296296
"algorithm": "sha256"
297297
},
298298
{
299-
"id": "http/golang.org/dl/go1.25.7.linux-arm64.tar.gz",
300-
"checksum": "BA611A53534135A81067240EFF9508CD7E256C560EDD5D8C2FEF54F083C07129",
299+
"id": "http/golang.org/dl/go1.26.0.linux-arm64.tar.gz",
300+
"checksum": "BD03B743EB6EB4193EA3C3FD3956546BF0E3CA5B7076C8226334AFE6B75704CD",
301301
"algorithm": "sha256"
302302
},
303303
{
304-
"id": "http/golang.org/dl/go1.25.7.windows-amd64.zip",
305-
"checksum": "C75E5F4FF62D085CC0017BE3AD19D5536F46825FA05DB06EC468941F847E3228",
304+
"id": "http/golang.org/dl/go1.26.0.windows-amd64.zip",
305+
"checksum": "9BBE0FC64236B2B51F6255C05C4232532B8ECC0E6D2E00950BD3021D8A4D07D4",
306306
"algorithm": "sha256"
307307
},
308308
{
309-
"id": "http/golang.org/dl/go1.25.7.windows-arm64.zip",
310-
"checksum": "807033F85931BC4A589CA8497535DCBEB1F30D506E47FA200F5F04C4A71C3D9F",
309+
"id": "http/golang.org/dl/go1.26.0.windows-arm64.zip",
310+
"checksum": "73BDBB9F64AA152758024485C5243A1098182BB741FCC603B6FB664EE5E0FE35",
311311
"algorithm": "sha256"
312312
},
313313
{

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/suzuki-shunsuke/tfcmt/v4
22

3-
go 1.25.7
3+
go 1.26.0
44

55
require (
66
github.com/Masterminds/sprig/v3 v3.3.0

pkg/notifier/github/comment.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func (g *CommentService) listIssueComment(ctx context.Context, owner, repo strin
9898
if !q.Repository.Issue.Comments.PageInfo.HasNextPage {
9999
break
100100
}
101-
variables["commentsCursor"] = githubv4.NewString(q.Repository.Issue.Comments.PageInfo.EndCursor)
101+
variables["commentsCursor"] = new(q.Repository.Issue.Comments.PageInfo.EndCursor)
102102
}
103103
return allComments, nil
104104
}
@@ -134,7 +134,7 @@ func (g *CommentService) listPRComment(ctx context.Context, owner, repo string,
134134
if !q.Repository.PullRequest.Comments.PageInfo.HasNextPage {
135135
break
136136
}
137-
variables["commentsCursor"] = githubv4.NewString(q.Repository.PullRequest.Comments.PageInfo.EndCursor)
137+
variables["commentsCursor"] = new(q.Repository.PullRequest.Comments.PageInfo.EndCursor)
138138
}
139139
return allComments, nil
140140
}

pkg/notifier/github/github_test.go

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,19 @@ func newFakeAPI() fakeAPI {
5757
return fakeAPI{
5858
FakeIssuesCreateComment: func(ctx context.Context, number int, comment *github.IssueComment) (*github.IssueComment, *github.Response, error) {
5959
return &github.IssueComment{
60-
ID: github.Ptr(int64(371748792)),
61-
Body: github.Ptr("comment 1"),
60+
ID: new(int64(371748792)),
61+
Body: new("comment 1"),
6262
}, nil, nil
6363
},
6464
FakeIssuesListLabels: func(ctx context.Context, number int, opts *github.ListOptions) ([]*github.Label, *github.Response, error) {
6565
labels := []*github.Label{
6666
{
67-
ID: github.Ptr(int64(371748792)),
68-
Name: github.Ptr("label 1"),
67+
ID: new(int64(371748792)),
68+
Name: new("label 1"),
6969
},
7070
{
71-
ID: github.Ptr(int64(371765743)),
72-
Name: github.Ptr("label 2"),
71+
ID: new(int64(371765743)),
72+
Name: new("label 2"),
7373
},
7474
}
7575
return labels, nil, nil
@@ -82,42 +82,42 @@ func newFakeAPI() fakeAPI {
8282
},
8383
FakeRepositoriesCreateComment: func(ctx context.Context, sha string, comment *github.RepositoryComment) (*github.RepositoryComment, *github.Response, error) {
8484
return &github.RepositoryComment{
85-
ID: github.Ptr(int64(28427394)),
86-
CommitID: github.Ptr("04e0917e448b662c2b16330fad50e97af16ff27a"),
87-
Body: github.Ptr("comment 1"),
85+
ID: new(int64(28427394)),
86+
CommitID: new("04e0917e448b662c2b16330fad50e97af16ff27a"),
87+
Body: new("comment 1"),
8888
}, nil, nil
8989
},
9090
FakeRepositoriesListCommits: func(ctx context.Context, opt *github.CommitsListOptions) ([]*github.RepositoryCommit, *github.Response, error) {
9191
commits := []*github.RepositoryCommit{
9292
{
93-
SHA: github.Ptr("04e0917e448b662c2b16330fad50e97af16ff27a"),
93+
SHA: new("04e0917e448b662c2b16330fad50e97af16ff27a"),
9494
},
9595
{
96-
SHA: github.Ptr("04e0917e448b662c2b16330fad50e97af16ff27b"),
96+
SHA: new("04e0917e448b662c2b16330fad50e97af16ff27b"),
9797
},
9898
{
99-
SHA: github.Ptr("04e0917e448b662c2b16330fad50e97af16ff27c"),
99+
SHA: new("04e0917e448b662c2b16330fad50e97af16ff27c"),
100100
},
101101
}
102102
return commits, nil, nil
103103
},
104104
FakeRepositoriesGetCommit: func(ctx context.Context, sha string) (*github.RepositoryCommit, *github.Response, error) {
105105
return &github.RepositoryCommit{
106-
SHA: github.Ptr(sha),
106+
SHA: new(sha),
107107
Commit: &github.Commit{
108-
Message: github.Ptr(sha),
108+
Message: new(sha),
109109
},
110110
}, nil, nil
111111
},
112112
FakePullRequestsListPullRequestsWithCommit: func(ctx context.Context, sha string, opt *github.ListOptions) ([]*github.PullRequest, *github.Response, error) {
113113
return []*github.PullRequest{
114114
{
115-
State: github.Ptr("open"),
116-
Number: github.Ptr(1),
115+
State: new("open"),
116+
Number: new(1),
117117
},
118118
{
119-
State: github.Ptr("closed"),
120-
Number: github.Ptr(2),
119+
State: new("closed"),
120+
Number: new(2),
121121
},
122122
}, nil, nil
123123
},

0 commit comments

Comments
 (0)