Conversation
📊 Code Coverage ReportCoverage by file |
There was a problem hiding this comment.
Pull Request Overview
This PR unexports struct types in getter mode by changing their naming from PascalCase to camelCase. The structs are implementation details that users don't directly interact with—they only use the exported variables and getter methods. This change improves encapsulation by making the internal structure types private while keeping the public API unchanged.
Key changes:
- Modified struct name generation to use
sx.CamelCase()instead ofsx.PascalCase() - Updated all test assertions to check for unexported struct names
- Regenerated example configuration with unexported struct types
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| internal/generator/struct_gen.go | Changed struct name generation from PascalCase to camelCase for all config and item structs |
| internal/generator/generator_test.go | Updated test expectations to validate unexported struct naming convention |
| example/getter_config/config.go | Regenerated example with unexported struct types throughout |
💡 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.
Unexports struct types in getter mode since they are implementation details. Users interact only with getter methods and exported config variables, not the struct types themselves.
Changes struct generation from PascalCase (exported) to camelCase (unexported) for all config struct types.