Add IsDev() method to check if debug handler is active#12
Add IsDev() method to check if debug handler is active#12connerohnesorge merged 3 commits intomainfrom
Conversation
- Add exported IsDev() function that checks if default generator uses DebugHandler - Update simple-debug example to conditionally include Tailwind CDN using IsDev() - Enables conditional development tooling based on handler type 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. WalkthroughA new function, Changes
Sequence Diagram(s)sequenceDiagram
participant Browser
participant TemplateEngine
participant twerge
Browser->>TemplateEngine: Request page
TemplateEngine->>twerge: Call IsDev()
twerge-->>TemplateEngine: Return true/false
alt IsDev() is true
TemplateEngine->>Browser: Render HTML with Tailwind CSS script tag
else IsDev() is false
TemplateEngine->>Browser: Render HTML without Tailwind CSS script tag
end
Possibly related PRs
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (1.64.8)level=warning msg="[runner] Can't run linter goanalysis_metalinter: buildir: failed to load package : could not load export data: no export data for "github.com/conneroisu/twerge"" 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✨ 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. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary
IsDev()function that checks if default generator uses*DebugHandlerIsDev()Test plan
IsDev()returnstruewhen debug handler is activefalsefor non-debug handlers🤖 Generated with Claude Code
Summary by CodeRabbit