Conversation
Using Gemini Code AssistThe 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
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 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. |
There was a problem hiding this comment.
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 withreflect.TypeFor[...]()and update pointer-kind checks toreflect.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 Nandwg.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.
No description provided.