[Bug Report] miss makezero in slice init · Issue #177 · bilibili/overlord · GitHub
Skip to content

[Bug Report] miss makezero in slice init #177

Open

Description

@alingse

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

see issues alingse/go-linter-runner#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))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions