GetSelectedNode returns the currently selected node.
()
| 120 | |
| 121 | // GetSelectedNode returns the currently selected node. |
| 122 | func (nl *NodeList) GetSelectedNode() *api.Node { |
| 123 | idx := nl.GetCurrentItem() |
| 124 | if idx >= 0 && idx < len(nl.nodes) { |
| 125 | return nl.nodes[idx] |
| 126 | } |
| 127 | |
| 128 | return nil |
| 129 | } |
| 130 | |
| 131 | // GetNodes returns the current nodes slice. |
| 132 | func (nl *NodeList) GetNodes() []*api.Node { |
nothing calls this directly
no test coverage detected