diff options
Diffstat (limited to 'filter.go')
| -rw-r--r-- | filter.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |