From c5d833db82fbf4f59ab212792da8d9c7eb744dd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=AEittaG=20ordnasselA?= Date: Fri, 31 May 2019 11:12:16 +0200 Subject: [PATCH] Add MakePackWithSchema --- pack.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pack.go b/pack.go index 113d44b..ba63e77 100644 --- a/pack.go +++ b/pack.go @@ -34,8 +34,14 @@ type AlternateProvider struct { } // MakePack makes a booster pack from a given set +// It's a shortcut to `MakePackWithSchema(set.PackSchema())` func MakePack(set Set) Pack { schema := set.PackSchema() + return MakePackWithSchema(schema) +} + +// MakePackWithSchema makes a booster pack from a given schema +func MakePackWithSchema(schema PackSchema) Pack { pack := make(Pack, 0) for _, slot := range schema.Slots { // Default provider