corrction of the non initialized map

This commit is contained in:
pb 2025-07-30 18:21:09 +02:00
parent a093369dc5
commit be2a1cc114

View File

@ -227,7 +227,8 @@ func (wf *Workflow) Planify(start time.Time, end *time.Time, request *tools.APIR
return longest, priceds, wf, nil
}
func (w *Workflow) GetItemsByResources() (res map[tools.DataType]map[string][]string) {
func (w *Workflow) GetItemsByResources() (map[tools.DataType]map[string][]string) {
res := make(map[tools.DataType]map[string][]string)
dtMethodMap := map[tools.DataType]func() []graph.GraphItem{
tools.STORAGE_RESOURCE: func() []graph.GraphItem { return w.GetGraphItems(w.Graph.IsStorage) },
tools.DATA_RESOURCE: func() []graph.GraphItem { return w.GetGraphItems(w.Graph.IsData) },
@ -246,7 +247,7 @@ func (w *Workflow) GetItemsByResources() (res map[tools.DataType]map[string][]st
}
}
return
return res
}
func plan[T resources.ResourceInterface](