Skip to content

Bug Report: miss makezero in slice #229

Open
@alingse

Description

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/9243005739/job/25426568199

====================================================================================================
append to slice `tasks` with non-zero initialized length at https://github.com/moncho/dry/blob/master/mocks/docker_swarmDaemon.go#L71:11
====================================================================================================
	tasks := make([]swarm.Task, len(services))
	for _, service := range services {
		tasks = append(tasks, swarm.Task{ServiceID: service, NodeID: TestNodeID})
	}

	return tasks, nil

should be update to tasks := make([]swarm.Task, 0, len(services))

Activity

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions