aboutsummaryrefslogtreecommitdiffstats
path: root/filter.go
diff options
context:
space:
mode:
Diffstat (limited to 'filter.go')
-rw-r--r--filter.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/filter.go b/filter.go
index 48f3e67..2f855fe 100644
--- a/filter.go
+++ b/filter.go
@@ -2,7 +2,9 @@ package main
import "reflect"
-// filterFunc returns items from a slice where the given field equals the value.
+// filterFunc returns items from a slice where the given
+// field equals the value.
+//
// Template usage: {{range filter .posts "draft" false}}
func filterFunc(items any, field string, value any) []any {
var result []any