Use consts for route names and templates.

This commit is contained in:
mikestefanello 2023-12-16 11:07:20 -05:00
parent a787d5dc7f
commit 60c8aefd49
30 changed files with 135 additions and 82 deletions

View file

@ -39,7 +39,7 @@ func GetFuncMap() template.FuncMap {
}
// HasField checks if an interface contains a given field
func HasField(v interface{}, name string) bool {
func HasField(v any, name string) bool {
rv := reflect.ValueOf(v)
if rv.Kind() == reflect.Ptr {
rv = rv.Elem()