testjobqueue: initialize dependants map
Adding to a nil map leads to panic. We must ensure that all maps are initialized before use. Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
parent
23dc0a2c28
commit
f355bdd426
1 changed files with 3 additions and 2 deletions
|
|
@ -38,8 +38,9 @@ type job struct {
|
|||
|
||||
func New() *testJobQueue {
|
||||
return &testJobQueue{
|
||||
jobs: make(map[uuid.UUID]*job),
|
||||
pending: make(map[string][]uuid.UUID),
|
||||
jobs: make(map[uuid.UUID]*job),
|
||||
pending: make(map[string][]uuid.UUID),
|
||||
dependants: make(map[uuid.UUID][]uuid.UUID),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue