-
Notifications
You must be signed in to change notification settings - Fork 0
Unexport struct types in getter mode #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📊 Code Coverage ReportCoverage by file |
There was a problem hiding this 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 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.
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.