{"id":25274538,"url":"https://github.com/piszmog/gotoggle","last_synced_at":"2025-04-06T09:16:06.933Z","repository":{"id":97436544,"uuid":"179986124","full_name":"Piszmog/gotoggle","owner":"Piszmog","description":"Feature Toggles for Go","archived":false,"fork":false,"pushed_at":"2019-10-18T20:47:45.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"develop","last_synced_at":"2025-03-22T07:59:24.662Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/Piszmog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-07T15:35:19.000Z","updated_at":"2019-10-18T20:47:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"bb88efd0-59b5-4b42-9cb2-46554b276ce1","html_url":"https://github.com/Piszmog/gotoggle","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Piszmog%2Fgotoggle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Piszmog%2Fgotoggle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Piszmog%2Fgotoggle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Piszmog%2Fgotoggle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Piszmog","download_url":"https://codeload.github.com/Piszmog/gotoggle/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247457796,"owners_count":20941907,"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":[],"created_at":"2025-02-12T14:30:36.634Z","updated_at":"2025-04-06T09:16:06.912Z","avatar_url":"https://github.com/Piszmog.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Feature Toggle\n[![Build Status](https://travis-ci.org/Piszmog/gotoggle.svg?branch=develop)](https://travis-ci.org/Piszmog/gotoggle)\n[![Coverage Status](https://coveralls.io/repos/github/Piszmog/gotoggle/badge.svg?branch=develop)](https://coveralls.io/github/Piszmog/gotoggle?branch=develop)\n[![Go Report Card](https://goreportcard.com/badge/github.com/Piszmog/gotoggle)](https://goreportcard.com/report/github.com/Piszmog/gotoggle)\n[![GitHub release](https://img.shields.io/github/release/Piszmog/gotoggle.svg)](https://github.com/Piszmog/gotoggle/releases/latest)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nThis is a simple package for using feature toggles in Go.\n\nTo use, simply initialize the features with a configuration or use `gotoggle.AddFeatures(..)` / `gotoggle.AddFeature(..)` \nto setup the features. Then use `gotoggle.IsEnabled(..)` to determine if a feature is enabled.\n\nDetermining if a feature is enabled is case insensitive. There is no different between \"myFeature\" and \"myfeature\". \n\n## Example\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/Piszmog/gotoggle\"\n)\n\nfunc main() {\n\tconfigJSON := `{\"features\":{\"feature1\":true,\"feature2\":false}}`\n\tvar config gotoggle.Configuration\n\terr := json.Unmarshal([]byte(configJSON), \u0026config)\n\tif err != nil {\n\t\t// do something\n\t}\n\tgotoggle.InitializeFeatures(config)\n\t// ...\n\tif gotoggle.IsEnabled(\"myFeature\") {\n\t\t// do something\n\t}\n}\n```\n\n### Usage\nInitializing or adding features should be done once. Under the hood, the feature map is not safe to update in many \ndifferent goroutines. You can access the features from different goroutines.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiszmog%2Fgotoggle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiszmog%2Fgotoggle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiszmog%2Fgotoggle/lists"}