feat(integration): make Go a full example-based variant#267
Open
sarahxsanders wants to merge 3 commits into
Open
feat(integration): make Go a full example-based variant#267sarahxsanders wants to merge 3 commits into
sarahxsanders wants to merge 3 commits into
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>
sarahxsanders
force-pushed
the
posthog-code/integration-go-framework
branch
from
July 23, 2026 19:21
18b4e97 to
6dabe99
Compare
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>
sarahxsanders
marked this pull request as ready for review
July 24, 2026 15:15
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>
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.
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.