Skip to content

all: Run go fix ./...#14600

Merged
bep merged 1 commit intogohugoio:masterfrom
bep:fix/modern20260307
Mar 7, 2026
Merged

all: Run go fix ./...#14600
bep merged 1 commit intogohugoio:masterfrom
bep:fix/modern20260307

Conversation

@bep
Copy link
Member

@bep bep commented Mar 7, 2026

No description provided.

@bep bep marked this pull request as ready for review March 7, 2026 17:11
@gemini-code-assist
Copy link

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR applies go fix ./... across the codebase, updating code to newer Go idioms/APIs (notably reflect.TypeFor, reflect.Pointer, strings.Builder, integer range loops, and sync.WaitGroup.Go) consistent with the repository’s go 1.25.0 setting.

Changes:

  • Replace various reflect.TypeOf(...) patterns with reflect.TypeFor[...]() and update pointer-kind checks to reflect.Pointer.
  • Reduce string-concatenation churn by switching hot paths and benchmarks/tests to strings.Builder.
  • Modernize loops and goroutine spawning patterns (e.g., for i := range N and wg.Go(...)).

Reviewed changes

Copilot reviewed 44 out of 44 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tpl/tplimpl/template_funcs.go Use reflect.TypeFor for hmaps.Params type comparisons.
tpl/strings/truncate.go Use strings.Builder for building truncated output.
tpl/partials/partials_integration_test.go Use strings.Builder for benchmark txtar fixture construction.
tpl/collections/reflect_helpers.go Update pointer-kind detection to reflect.Pointer.
tpl/collections/index.go Update canBeNil kind set to use reflect.Pointer.
tpl/collections/collections_integration_test.go Use strings.Builder and integer range loops for benchmark fixture creation.
tpl/collections/collections.go Use strings.Builder for Delimit output; update kind checks to reflect.Pointer.
tpl/collections/apply.go Use reflect.TypeFor for reflect.Value type comparisons.
resources/page/path_integration_test.go Use strings.Builder for txtar fixture generation and subsequent string transforms.
resources/page/pages_cache_test.go Switch to sync.WaitGroup.Go and integer range loops in concurrency test.
resources/page/page_generate/generate_page_wrappers.go Use reflect.TypeFor and strings.Builder for generated import block formatting.
resources/images/color.go Use strings.Builder for expanding short hex color strings.
related/related_integration_test.go Use strings.Builder for benchmark txtar fixture generation.
related/inverted_index_test.go Use strings.Builder in String() for reduced concatenation overhead.
navigation/menu_cache_test.go Switch to sync.WaitGroup.Go and integer range loops in concurrency test.
markup/goldmark/goldmark_integration_test.go Use strings.Builder for benchmark fixtures; update calls to .String() where needed.
internal/warpc/webp.go Use integer range loops for frame and pixel iteration.
hugolib/taxonomy_test.go Use strings.Builder for test/benchmark fixtures; use integer range loops.
hugolib/sitesmatrix/sitematrix_integration_test.go Use strings.Builder for benchmark fixture generation.
hugolib/site_stats_test.go Use strings.Builder for large test fixture assembly.
hugolib/shortcode.go Use strings.Builder for shortcode inner content assembly.
hugolib/resource_chain_test.go Remove unnecessary loop-variable rebind (new range semantics).
hugolib/rebuild_test.go Use strings.Builder for benchmark fixture generation.
hugolib/paginator_test.go Use strings.Builder and integer range loops for fixture creation.
hugolib/pages_test.go Use strings.Builder for fixture construction.
hugolib/page_test.go Use strings.Builder for expected output building and fixture assembly; remove unnecessary loop-variable rebind.
hugolib/language_test.go Remove unnecessary loop-variable rebind (new range semantics).
hugolib/hugo_smoke_test.go Use strings.Builder for benchmark fixture construction.
hugolib/hugo_sites_build_test.go Use integer range loops for deterministic iteration counts.
hugolib/hugo_sites_build_errors_test.go Remove unnecessary loop-variable rebind (new range semantics).
hugolib/doctree/simpletree_test.go Use integer range loops in benchmark setup.
hugolib/cascade_test.go Use strings.Builder for benchmark fixture assembly.
htesting/hqt/checkers.go Update pointer-kind detection to reflect.Pointer.
helpers/path_test.go Use integer range loops in tests/benchmarks.
helpers/path.go Use strings.Builder for dotted relative path generation.
config/security/securityConfig.go Use reflect.TypeFor in decode hook type matching.
common/types/types.go Update nil-check kind set to use reflect.Pointer.
common/types/evictingqueue_test.go Switch to sync.WaitGroup.Go in concurrency test.
common/hreflect/helpers.go Use reflect.TypeFor and update pointer-kind checks to reflect.Pointer.
common/hreflect/convert.go Update pointer-kind cases to reflect.Pointer.
common/herrors/file_error_test.go Use strings.Builder for large content assembly.
common/hashing/hashing_test.go Switch to sync.WaitGroup.Go and rely on new range semantics for loop variable capture.
codegen/methods_test.go Use reflect.TypeFor for interface type references in tests.
codegen/methods.go Update pointer-kind detection to reflect.Pointer.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@bep bep merged commit e310822 into gohugoio:master Mar 7, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants