ValidSort reports whether s names a sort.
(s string)
| 18 | |
| 19 | // ValidSort reports whether s names a sort. |
| 20 | func ValidSort(s string) bool { |
| 21 | return s == SortAge || s == SortImportance || s == SortSimplicity |
| 22 | } |
| 23 | |
| 24 | // Key is a row's place in the total order of one sort. Age orders by (waiting |
| 25 | // since, created, item id) ascending. The score sorts order by the primary |