Root finds the root chart.
()
| 96 | |
| 97 | // Root finds the root chart. |
| 98 | func (ch *Chart) Root() *Chart { |
| 99 | if ch.IsRoot() { |
| 100 | return ch |
| 101 | } |
| 102 | return ch.Parent().Root() |
| 103 | } |
| 104 | |
| 105 | // Dependencies are the charts that this chart depends on. |
| 106 | func (ch *Chart) Dependencies() []*Chart { return ch.dependencies } |