Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR applies go fix ./... updates (run with Go 1.26 per description) and modernizes the codebase by replacing interface{} usages with any, along with related reflect/type helper updates.
Changes:
- Replace
interface{}withanyacross code, docs, tests, and examples. - Update reflection kind checks to use
reflect.Pointerand simplify type acquisition viareflect.TypeFor[...](). - Minor whitespace/comment cleanups in tests and examples.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| types/types.go | Updates JSONText documentation to use any. |
| sqlx.go | Replaces pointer-kind checks and updates SliceScan/MapScan docs to any. |
| sqlx_test.go | Updates comments and test case naming to any. |
| sqlx_context_test.go | Trims comment whitespace; updates comment to any. |
| reflectx/reflect.go | Uses reflect.Pointer in reflection helpers. |
| named.go | Updates map conversion docs/types to any and uses reflect.TypeFor. |
| named_context.go | Updates NamedQueryContext docs to map[string]any. |
| examples/preparedstatements/main.go | Updates example parameter maps to map[string]any. |
| examples/named/main.go | Updates example parameter maps/comments to any and removes trailing whitespace. |
| examples/bulk/main.go | Updates bulk example argument type to []map[string]any. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is the result of running
go fix ./...(thegoversion is 1.26) and manual replacing ofinterface{}withany.Follows #21