repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

pico / db
Eric Bower · 03 Aug 22

util.go

 1package db
 2
 3import "strings"
 4
 5func FilterMetaFiles(posts []*Post) []*Post {
 6	filtered := []*Post{}
 7	for _, post := range posts {
 8		if strings.HasPrefix(post.Filename, "_") {
 9			continue
10		}
11		filtered = append(filtered, post)
12	}
13	return filtered
14}