Skip to content
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

chore: update go sdk examples #8145

Merged
merged 1 commit into from
Sep 16, 2024
Merged

chore: update go sdk examples #8145

merged 1 commit into from
Sep 16, 2024

Conversation

sjaanus
Copy link
Contributor

@sjaanus sjaanus commented Sep 16, 2024

No description provided.

Copy link

vercel bot commented Sep 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 16, 2024 10:07am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Sep 16, 2024 10:07am

Copy link
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

@@ -40,6 +40,8 @@ const unleash = initialize({
`,
Go: `import (
"github.com/Unleash/unleash-client-go/v3"
"net/http"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These imports will be added be go/idea anyways, so I will add it myself.

@@ -48,6 +50,7 @@ func init() {
unleash.WithAppName("unleash-onboarding-golang"),
unleash.WithUrl("<YOUR_API_URL>"),
unleash.WithCustomHeaders(http.Header{"Authorization": {"<YOUR_API_TOKEN>"}}),
unleash.WithMetricsInterval(5*time.Second),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make them the same interval as node example

@@ -192,7 +195,13 @@ export const checkFlagCodeSnippets: Record<SdkName, string> = {
console.log('Is enabled', unleash.isEnabled('<YOUR_FLAG>'));
}, 1000);
`,
Go: ``,
Go: `func main() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for cycle as node.

@sjaanus sjaanus merged commit f76f754 into main Sep 16, 2024
13 checks passed
@sjaanus sjaanus deleted the go-update branch September 16, 2024 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants