]> git.maquefel.me Git - brevno-suite/hugo/commit
all: Simplify the reflect usage
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 23 Oct 2025 09:00:38 +0000 (11:00 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sun, 26 Oct 2025 16:36:58 +0000 (17:36 +0100)
commit3893e70510af80e6ef9fff46c1922404706b1c2b
tree6b44c71adef678a6c8b17d91285d14a0ebc3d547
parentb95f7d2552b45b3698a6d191591add4e74236380
all: Simplify the reflect usage

* Use helper funcs in hreflect package when possible.
* Use hreflect.ConvertIfPossible to handle conversions when possible.
* Move scratch.go from common/maps to common/hstore to clear cyclic import in the next step.
* Move Indirect to hreflect and reimplementing it and adusting the behavior to preserve struct pointers.
* Adjust evaluateSubElem used by where and others making the struct pointer method case slightly faster.
31 files changed:
common/collections/append.go
common/collections/append_test.go
common/hreflect/convert.go [new file with mode: 0644]
common/hreflect/convert_test.go [new file with mode: 0644]
common/hreflect/helpers.go
common/hreflect/helpers_test.go
common/hstore/scratch.go [new file with mode: 0644]
common/hstore/scratch_test.go [new file with mode: 0644]
common/hugo/hugo.go
common/maps/scratch.go [deleted file]
common/maps/scratch_test.go [deleted file]
htesting/hqt/checkers.go
hugolib/page__common.go
hugolib/page__new.go
hugolib/pagesfromdata/pagesfromgotmpl.go
hugolib/shortcode.go
hugolib/site.go
resources/page/page.go
resources/page/page_nop.go
resources/page/site.go
resources/page/testhelpers_test.go
tpl/collections/apply.go
tpl/collections/collections.go
tpl/collections/complement.go
tpl/collections/index.go
tpl/collections/reflect_helpers.go
tpl/collections/sort.go
tpl/collections/symdiff.go
tpl/collections/symdiff_test.go
tpl/collections/where.go
tpl/collections/where_test.go