aboutsummaryrefslogtreecommitdiff
path: root/internal/template/functions.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/template/functions.go')
-rw-r--r--internal/template/functions.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/internal/template/functions.go b/internal/template/functions.go
index ef3ffd37..2db98420 100644
--- a/internal/template/functions.go
+++ b/internal/template/functions.go
@@ -8,6 +8,7 @@ import (
"html/template"
"math"
"net/mail"
+ "slices"
"strings"
"time"
@@ -72,12 +73,7 @@ func (f *funcMap) Map() template.FuncMap {
return link
},
"mustBeProxyfied": func(mediaType string) bool {
- for _, t := range config.Opts.ProxyMediaTypes() {
- if t == mediaType {
- return true
- }
- }
- return false
+ return slices.Contains(config.Opts.ProxyMediaTypes(), mediaType)
},
"domain": func(websiteURL string) string {
return urllib.Domain(websiteURL)