overlord icon indicating copy to clipboard operation
overlord copied to clipboard

[Bug Report] miss makezero in slice init

Open alingse opened this issue 8 months ago • 0 comments

I was running github actions to run linter makezero for top github golang repos.

see issues https://github.com/alingse/go-linter-runner/issues/1

and the github actions output https://github.com/alingse/go-linter-runner/actions/runs/9243212242/job/25427060632

====================================================================================================
append to slice `ofid` with non-zero initialized length at https://github.com/bilibili/overlord/blob/master/platform/mesos/scheduler.go#L243:10
====================================================================================================

the ofid := make([]ms.OfferID, len(offers)) should be ofid := make([]ms.OfferID, 0, len(offers))

alingse avatar May 27 '24 15:05 alingse