Repository navigation
feat(integration): make Go a full example-based variant - #267
Conversation
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Results will be posted here when complete. |
Replace the go docs-only variant with a full variant anchored on a real example app (example-apps/go): an idiomatic net/http service that creates one PostHog client per process, configures it from environment variables, identifies users, captures events, evaluates feature flags via the current EvaluateFlags snapshot API, reports errors, and flushes on graceful shutdown with client.Close(). An anchoring example collapses the run-to-run variance a docs-only prompt leaves open. Removes description-go-docs-only.md (now unused) and points the variant at the example via example_paths + framework: go. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
18b4e97 to
6dabe99
Compare
|
Full e2e run of this PR pair (wizard #945 + context-mill #267, both with main merged in) against gotify/server — real Go server, Outcome: PostHog set up — dashboard and notebook created through prod MCP, Note: the branch as filed fails at the dashboard step — its agent prompts predate the |
gewenyu99
left a comment
There was a problem hiding this comment.
Stamped but you have some unsigned commits
The handlers interpolated the cookie distinct id, the submitted user_id, the email, and the error message straight into HTML. Since this example is copied into real integrations, escape all user-controlled strings with html.EscapeString so the pattern that gets propagated is safe by default. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Semgrep (cookie-missing-httponly / cookie-missing-secure) blocks cookies without these flags. Set HttpOnly, Secure, and SameSite=Lax on both the user_id and burrito_count cookies so the copied pattern is secure by default. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
13d78c9 to
35882d7
Compare

























Promotes the Go integration from a docs-only variant to a full example-based variant, anchored on a real, compiling example app at
example-apps/go.Why: without an anchoring example, the wizard reinvents the integration shape every run. A worked example collapses that variance — the point raised in review.
What's here:
example-apps/go/— idiomaticnet/httpservice: one client per process, env-var config, identify, event capture, feature flags via the currentEvaluateFlagssnapshot API, error tracking, andclient.Close()on graceful shutdown.go build+go vetclean.config.yaml: go switched fromtemplate: description-go-docs-only.md→example_paths+framework: go.description-go-docs-only.md.Ships as a pair with the wizard detection PR PostHog/wizard#945.