Use consts for route names and templates.
This commit is contained in:
parent
a787d5dc7f
commit
60c8aefd49
30 changed files with 135 additions and 82 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue