mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
chore: update go sdk examples (#8145)
This commit is contained in:
parent
bca02a05ee
commit
f76f754eca
@ -40,6 +40,8 @@ const unleash = initialize({
|
||||
`,
|
||||
Go: `import (
|
||||
"github.com/Unleash/unleash-client-go/v3"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -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),
|
||||
)
|
||||
}`,
|
||||
Ruby: `Unleash.configure do |config|
|
||||
@ -192,7 +195,13 @@ export const checkFlagCodeSnippets: Record<SdkName, string> = {
|
||||
console.log('Is enabled', unleash.isEnabled('<YOUR_FLAG>'));
|
||||
}, 1000);
|
||||
`,
|
||||
Go: ``,
|
||||
Go: `func main() {
|
||||
for {
|
||||
unleash.IsEnabled("<YOUR_FLAG>")
|
||||
time.Sleep(time.Second)
|
||||
}
|
||||
}, 1000);
|
||||
`,
|
||||
Ruby: ``,
|
||||
PHP: ``,
|
||||
Rust: ``,
|
||||
|
Loading…
Reference in New Issue
Block a user