-
-
Notifications
You must be signed in to change notification settings - Fork 115
Print other enums for better understanding #390
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
WalkthroughAdds two additional print statements in the example within content/chapter 4/4.17-stringer.md to also output ADOLESCENTS.String() and ADULTS.String(), expanding the example’s output from one line to three. No changes to the Age type or its String() method. No public API modifications. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration 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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
content/chapter 4/4.17-stringer.md (2)
44-46: Prefer relying on fmt’s Stringer behavior (drop explicit .String())fmt automatically calls the String() method for types that implement it. This keeps the example idiomatic and a bit cleaner.
Apply:
-fmt.Println(CHILDERN.String()) - fmt.Println(ADOLESCENTS.String()) - fmt.Println(ADULTS.String()) +fmt.Println(CHILDERN) + fmt.Println(ADOLESCENTS) + fmt.Println(ADULTS)Note: If you want to keep explicit .String() for teaching purposes, feel free to ignore. Unrelated nit: “CHILDERN” seems misspelled; consider “CHILDREN” in a future pass for consistency.
45-46: Fix MD010 (no hard tabs) in code blockmarkdownlint flagged hard tabs on these lines; replace with spaces to satisfy CI/lint.
- fmt.Println(ADOLESCENTS.String()) - fmt.Println(ADULTS.String()) + fmt.Println(ADOLESCENTS.String()) + fmt.Println(ADULTS.String())
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
content/chapter 4/4.17-stringer.md(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
content/chapter 4/4.17-stringer.md
45-45: Hard tabs
Column: 1
(MD010, no-hard-tabs)
46-46: Hard tabs
Column: 1
(MD010, no-hard-tabs)
🔇 Additional comments (1)
content/chapter 4/4.17-stringer.md (1)
45-46: LGTM: additional prints improve example clarityShowing all enum values helps readers understand String() across the full range.
Print other enums for better understanding on 4.17.1 example.
Summary by CodeRabbit