stockList returns a sorted list of the stocks in the diagram.
()
| 296 | |
| 297 | // stockList returns a sorted list of the stocks in the diagram. |
| 298 | func (s *Sankey) stockList() []*stock { |
| 299 | var stocks []*stock |
| 300 | for _, ss := range s.stocks { |
| 301 | for _, sss := range ss { |
| 302 | stocks = append(stocks, sss) |
| 303 | } |
| 304 | } |
| 305 | sort.Sort(stockSorter(stocks)) |
| 306 | return stocks |
| 307 | } |
| 308 | |
| 309 | // stockSorter is a wrapper for a list of *stocks that implements |
| 310 | // sort.Interface. |
no test coverage detected