EnsureMinimumNumberOfStacks ensures there are at least stacks in the foundation by creating new ones if there are fewer than the specified number
(num int)
| 107 | // EnsureMinimumNumberOfStacks ensures there are at least <num> stacks in the foundation by creating new ones if there |
| 108 | // are fewer than the specified number |
| 109 | func EnsureMinimumNumberOfStacks(num int) []string { |
| 110 | var stacks []string |
| 111 | for stacks = FetchStacks(); len(stacks) < num; { |
| 112 | stacks = append(stacks, CreateStack()) |
| 113 | } |
| 114 | return stacks |
| 115 | } |
no test coverage detected