Skip to content

Commit

Permalink
feat(tiles): support collection-level OGC API tiles (geodata tiles). …
Browse files Browse the repository at this point in the history
…Remove unused template func.
  • Loading branch information
rkettelerij committed Aug 27, 2024
1 parent dbaa60a commit f3f1469
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions internal/engine/templatefuncs.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package engine
import (
htmltemplate "html/template"
"log"
"reflect"
"strconv"
"strings"
texttemplate "text/template"
Expand Down Expand Up @@ -31,7 +30,6 @@ func init() {
"humansize": humanSize,
"bytessize": bytesSize,
"isdate": isDate,
"hasfield": hasField,
}
sprigFuncs := sprig.FuncMap() // we also support https://github.com/go-task/slim-sprig functions
globalTemplateFuncs = combineFuncMaps(customFuncs, sprigFuncs)
Expand Down Expand Up @@ -113,14 +111,3 @@ func isDate(v any) bool {
}
return false
}

func hasField(v interface{}, name string) bool {
rv := reflect.ValueOf(v)
if rv.Kind() == reflect.Ptr {
rv = rv.Elem()
}
if rv.Kind() != reflect.Struct {
return false
}
return rv.FieldByName(name).IsValid()
}

0 comments on commit f3f1469

Please sign in to comment.