Rename common/maps to common/hmaps (#14384)

Go's stdlid now has a maps package, which is very useful. We have been using imports on the form `xmaps "maps"`, but auto import tools doesn't handle this, which is annoying.

I have been thinking about this for some time, but have been holding back because of all the import changes. However, now is a good time to do this, with very little unmerged code.
This commit is contained in:
Bjørn Erik Pedersen
2026-01-16 11:47:46 +01:00
committed by GitHub
parent 94f1ede3aa
commit 608ed09a0a
103 changed files with 591 additions and 604 deletions
+2 -2
View File
@@ -21,8 +21,8 @@ import (
"html/template"
bp "github.com/gohugoio/hugo/bufferpool"
"github.com/gohugoio/hugo/common/hmaps"
"github.com/gohugoio/hugo/common/maps"
"github.com/mitchellh/mapstructure"
"github.com/spf13/cast"
)
@@ -76,7 +76,7 @@ func (ns *Namespace) Jsonify(args ...any) (template.HTML, error) {
obj = args[0]
case 2:
var m map[string]any
m, err = maps.ToStringMapE(args[0])
m, err = hmaps.ToStringMapE(args[0])
if err != nil {
break
}