refactor: simplify Node struct with public Tags/Relations fields
This commit is contained in:
@@ -77,7 +77,7 @@ func PrintNodes(w io.Writer, svc service.NodeService, nodes []*models.Node, json
|
||||
})
|
||||
|
||||
for _, n := range nodes {
|
||||
n_rels := n.Relations()
|
||||
n_rels := n.Relations
|
||||
ns_rel_node_ids := n_rels[string(models.RelInNamespace)]
|
||||
ns_rel_node_titles := make([]string, 0, len(ns_rel_node_ids))
|
||||
for _, id := range ns_rel_node_ids {
|
||||
@@ -125,7 +125,7 @@ func PrintNode(w io.Writer, svc service.NodeService, n *models.Node, jsonOut boo
|
||||
fmt.Fprintf(w, "\n tags: %s\n", cPrimary.Sprint(strings.Join(tags, " • ")))
|
||||
}
|
||||
|
||||
n_rels := n.Relations()
|
||||
n_rels := n.Relations
|
||||
for relType := range n_rels {
|
||||
rel_node_ids := n_rels[string(relType)]
|
||||
if len(rel_node_ids) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user