From 74d189d24e03a7b8bf09c9c1e0289d89d3d522e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edmond=20Dant=C3=A8s?= <18221510672@139.com> Date: Fri, 6 Sep 2024 14:21:27 +0800 Subject: [PATCH] fix golangci-lint issue --- changes.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/changes.go b/changes.go index d79d1e5..fc6b7c2 100644 --- a/changes.go +++ b/changes.go @@ -664,9 +664,7 @@ func (s *ChangeService) Get(ctx context.Context, changeID string, AdditionalFiel change := Change{Raw: new(ChangeInfo), gerrit: s.gerrit, Base: changeID} opt := new(ChangeOptions) - for _, field := range AdditionalFields { - opt.AdditionalFields = append(opt.AdditionalFields, field) - } + opt.AdditionalFields = append(opt.AdditionalFields, AdditionalFields...) resp, err := change.Poll(ctx, opt) if err != nil { @@ -1133,4 +1131,4 @@ func (c *Change) CheckSubmitRequirements(ctx context.Context, input *SubmitRequi return nil, resp, err } return v, resp, nil -} \ No newline at end of file +}