getFromLegend returns the suffix of an entry in legend that starts with param. It returns def if no such entry is found.
(legend []string, param, def string)
| 471 | // getFromLegend returns the suffix of an entry in legend that starts |
| 472 | // with param. It returns def if no such entry is found. |
| 473 | func getFromLegend(legend []string, param, def string) string { |
| 474 | for _, s := range legend { |
| 475 | if strings.HasPrefix(s, param) { |
| 476 | return s[len(param):] |
| 477 | } |
| 478 | } |
| 479 | return def |
| 480 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…