~erock/pico

pico/db/util.go -rw-r--r-- 248 bytes
0c813f80Eric Bower chore: reference github instead of sr.ht 8 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package db

import "strings"

func FilterMetaFiles(posts []*Post) []*Post {
	filtered := []*Post{}
	for _, post := range posts {
		if strings.HasPrefix(post.Filename, "_") {
			continue
		}
		filtered = append(filtered, post)
	}
	return filtered
}