Skip to content

Commit 5b83201

Browse files
authored
Merge pull request kubernetes#3129 from sanposhiho/lint-issue
Fix an issue from golangci-lint
2 parents 7599e38 + 3e27dc7 commit 5b83201

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/repo/repo.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,8 @@ func (r *Repo) LoadLocalKEPs(sig string) ([]*api.Proposal, error) {
267267

268268
logrus.Debugf("loading the following local KEPs: %v", files)
269269

270-
var allKEPs []*api.Proposal
271-
for _, kepYamlPath := range files {
270+
allKEPs := make([]*api.Proposal, len(files))
271+
for i, kepYamlPath := range files {
272272
kep, err := r.loadKEPFromYaml(r.BasePath, kepYamlPath)
273273
if err != nil {
274274
return nil, errors.Wrapf(
@@ -278,7 +278,7 @@ func (r *Repo) LoadLocalKEPs(sig string) ([]*api.Proposal, error) {
278278
)
279279
}
280280

281-
allKEPs = append(allKEPs, kep)
281+
allKEPs[i] = kep
282282
}
283283

284284
logrus.Debugf("returning %d local KEPs", len(allKEPs))

0 commit comments

Comments
 (0)