diff --git a/scheduler/strategy/strategy.go b/scheduler/strategy/strategy.go index ccb36f8218..c85ed2d03f 100644 --- a/scheduler/strategy/strategy.go +++ b/scheduler/strategy/strategy.go @@ -22,9 +22,10 @@ var ( ) func init() { - strategies = make(map[string]PlacementStrategy) - strategies["binpacking"] = &BinPackingPlacementStrategy{} - strategies["random"] = &RandomPlacementStrategy{} + strategies = map[string]PlacementStrategy{ + "binpacking": &BinPackingPlacementStrategy{}, + "random": &RandomPlacementStrategy{}, + } } func New(nameAndOpts string) (PlacementStrategy, error) {