googleforgames / open-match

Flexible, extensible, and scalable video game matchmaking.
http://open-match.dev
Apache License 2.0
3.15k stars 333 forks source link

miss makezero in slice init #1764

Open alingse opened 3 months ago

alingse commented 3 months ago

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/9242991979/job/25426536505

====================================================================================================
append to slice `tags` with non-zero initialized length at https://github.com/googleforgames/open-match/blob/main/examples/functions/golang/backfill/mmf/matchfunction.go#L231:11
====================================================================================================

the tags := make([]string, len(tagFilters)) should be tags := make([]string, 0, len(tagFilters))

What happened:

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Output of kubectl version:

Cloud Provider/Platform (AKS, GKE, Minikube etc.):

Open Match Release Version:

Install Method(yaml/helm):