getSortKeyText returns the text key used when fields do not both use numeric tag IDs.
()
| 734 | |
| 735 | // getSortKeyText returns the text key used when fields do not both use numeric tag IDs. |
| 736 | func (t triple) getSortKeyText() string { |
| 737 | if t.tagID >= 0 { |
| 738 | return strconv.Itoa(t.tagID) |
| 739 | } |
| 740 | return SnakeCase(t.name) |
| 741 | } |
| 742 | |
| 743 | func lessTripleSortKey(a, b triple) bool { |
| 744 | if a.tagID >= 0 && b.tagID >= 0 && a.tagID != b.tagID { |
no test coverage detected