{"id":17753130,"url":"https://github.com/configcat/go-sdk","last_synced_at":"2025-06-13T21:39:42.299Z","repository":{"id":34710256,"uuid":"152915144","full_name":"configcat/go-sdk","owner":"configcat","description":"ConfigCat SDK for Go. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.","archived":false,"fork":false,"pushed_at":"2024-08-08T09:27:21.000Z","size":665,"stargazers_count":21,"open_issues_count":0,"forks_count":6,"subscribers_count":5,"default_branch":"v9","last_synced_at":"2024-10-08T09:08:36.795Z","etag":null,"topics":["configcat","configuration","configuration-management","feature-flag","feature-flags","feature-toggle","feature-toggles","featureflags","go","golang","remote-config"],"latest_commit_sha":null,"homepage":"https://configcat.com/docs/sdk-reference/go","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/configcat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-13T21:16:32.000Z","updated_at":"2024-08-08T09:27:25.000Z","dependencies_parsed_at":"2023-12-10T00:19:17.150Z","dependency_job_id":"7a12f25c-d6a4-4869-a60f-efa1d3a2cd66","html_url":"https://github.com/configcat/go-sdk","commit_stats":null,"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fgo-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fgo-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fgo-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fgo-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/configcat","download_url":"https://codeload.github.com/configcat/go-sdk/tar.gz/refs/heads/v9","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230554330,"owners_count":18244234,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["configcat","configuration","configuration-management","feature-flag","feature-flags","feature-toggle","feature-toggles","featureflags","go","golang","remote-config"],"created_at":"2024-10-26T13:22:44.427Z","updated_at":"2024-12-20T08:08:47.831Z","avatar_url":"https://github.com/configcat.png","language":"Go","readme":"# ConfigCat SDK for Go\r\nhttps://configcat.com\r\n\r\nConfigCat SDK for Go provides easy integration for your application to ConfigCat.\r\n\r\nConfigCat is a feature flag and configuration management service that lets you separate releases from deployments. You can turn your features ON/OFF using \u003ca href=\"https://app.configcat.com\" target=\"_blank\"\u003eConfigCat Dashboard\u003c/a\u003e even after they are deployed. ConfigCat lets you target specific groups of users based on region, email or any other custom user attribute.\r\n\r\nConfigCat is a \u003ca target=\"_blank\" href=\"https://configcat.com\"\u003ehosted feature flag service\u003c/a\u003e. Manage feature toggles across frontend, backend, mobile, desktop apps. \u003ca target=\"_blank\" href=\"https://configcat.com\"\u003eAlternative to LaunchDarkly\u003c/a\u003e. Management app + feature flag SDKs.\r\n\r\n[![Build Status](https://github.com/configcat/go-sdk/actions/workflows/go-ci.yml/badge.svg?branch=v9)](https://github.com/configcat/go-sdk/actions/workflows/go-ci.yml)\r\n[![Go Report Card](https://goreportcard.com/badge/github.com/configcat/go-sdk/v9)](https://goreportcard.com/report/github.com/configcat/go-sdk/v9)\r\n[![GoDoc](https://godoc.org/github.com/configcat/go-sdk?status.svg)](https://pkg.go.dev/github.com/configcat/go-sdk/v9)\r\n[![Sonar Coverage](https://img.shields.io/sonar/coverage/configcat_go-sdk?logo=SonarCloud\u0026server=https%3A%2F%2Fsonarcloud.io)](https://sonarcloud.io/project/overview?id=configcat_go-sdk)\r\n[![Sonar Quality Gate](https://img.shields.io/sonar/quality_gate/configcat_go-sdk?logo=sonarcloud\u0026server=https%3A%2F%2Fsonarcloud.io)](https://sonarcloud.io/project/overview?id=configcat_go-sdk)\r\n\r\n## Getting started\r\n\r\n### 1. Install the package with `go`\r\n```bash\r\ngo get github.com/configcat/go-sdk/v9\r\n```\r\n\r\n### 2. Go to the \u003ca href=\"https://app.configcat.com/sdkkey\" target=\"_blank\"\u003eConfigCat Dashboard\u003c/a\u003e to get your *SDK Key*:\r\n![SDK-KEY](https://raw.githubusercontent.com/ConfigCat/go-sdk/master/media/readme02-3.png  \"SDK-KEY\")\r\n\r\n\r\n### 3. Import the *ConfigCat* client package to your application\r\n```go\r\nimport \"github.com/configcat/go-sdk/v9\"\r\n```\r\n\r\n### 4. Create a *ConfigCat* client instance:\r\n```go\r\nclient := configcat.NewClient(\"#YOUR-SDK-KEY#\")\r\n```\r\n\r\n### 5. Get your setting value:\r\n```go\r\nisMyAwesomeFeatureEnabled := client.GetBoolValue(\"isMyAwesomeFeatureEnabled\", false, nil)\r\nif isMyAwesomeFeatureEnabled {\r\n    DoTheNewThing()\r\n} else {\r\n    DoTheOldThing()\r\n}\r\n```\r\n\r\n### 6. Close *ConfigCat* client on application exit:\r\n```go\r\nclient.Close()\r\n```\r\n\r\n\r\n## Getting user specific setting values with Targeting\r\n\r\nUsing this feature, you will be able to get different setting values for different users in your application by passing a `UserData` struct to the specific setting evaluation method (`GetBoolValue()`, `GetStringValue()`, `GetIntValue()`, `GetFloatValue()`).\r\n\r\nRead more about [Targeting here](https://configcat.com/docs/advanced/targeting/).\r\n```go\r\nuser := \u0026configcat.UserData{Identifier: \"#USER-IDENTIFIER#\"}\r\n\r\nisMyAwesomeFeatureEnabled := client.GetBoolValue(\"isMyAwesomeFeatureEnabled\", false, user)\r\nif isMyAwesomeFeatureEnabled {\r\n    DoTheNewThing()\r\n} else {\r\n    DoTheOldThing()\r\n}\r\n```\r\n\r\n## Polling Modes\r\nThe ConfigCat SDK supports 3 different polling mechanisms to acquire the setting values from ConfigCat. After latest setting values are downloaded, they are stored in the internal cache then all requests are served from there. Read more about Polling Modes and how to use them at [ConfigCat Docs](https://configcat.com/docs/sdk-reference/go/).\r\n\r\n## Need help?\r\nhttps://configcat.com/support\r\n\r\n## Contributing\r\nContributions are welcome. For more info please read the [Contribution Guideline](CONTRIBUTING.md).\r\n\r\n## About ConfigCat\r\n- [Official ConfigCat SDKs for other platforms](https://github.com/configcat)\r\n- [Documentation](https://configcat.com/docs)\r\n- [Blog](https://configcat.com/blog)\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfigcat%2Fgo-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconfigcat%2Fgo-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfigcat%2Fgo-sdk/lists"}