File: sort.go

package info (click to toggle)
glow 2.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 860 kB
  • sloc: makefile: 6
file content (12 lines) | stat: -rw-r--r-- 177 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
package ui

import (
	"cmp"
	"slices"
)

func sortMarkdowns(mds []*markdown) {
	slices.SortStableFunc(mds, func(a, b *markdown) int {
		return cmp.Compare(a.Note, b.Note)
	})
}