(in []gvNodeInput)
| 379 | } |
| 380 | |
| 381 | func normalizeNodeInputs(in []gvNodeInput) []GraphNode { |
| 382 | out := make([]GraphNode, 0, len(in)) |
| 383 | for _, n := range in { |
| 384 | id := firstNonEmpty(n.ID, n.Label, n.Title, n.Name) |
| 385 | if id == "" { |
| 386 | continue |
| 387 | } |
| 388 | out = append(out, GraphNode{ |
| 389 | ID: id, |
| 390 | Label: firstNonEmpty(n.Label, n.Title, n.Name, n.ID), |
| 391 | Kind: firstNonEmpty(n.Kind, n.Type, n.Group), |
| 392 | Summary: firstNonEmpty(n.Summary, n.Desc), |
| 393 | Weight: n.Weight, |
| 394 | }) |
| 395 | } |
| 396 | return out |
| 397 | } |
| 398 | |
| 399 | func normalizeEdgeInputs(in []gvEdgeInput) []GraphEdge { |
| 400 | out := make([]GraphEdge, 0, len(in)) |
no test coverage detected