{"id":17116484,"url":"https://github.com/dakimura/partition","last_synced_at":"2025-03-24T00:52:38.192Z","repository":{"id":137757609,"uuid":"282809002","full_name":"dakimura/partition","owner":"dakimura","description":null,"archived":false,"fork":false,"pushed_at":"2020-07-27T06:10:07.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-11T04:03:30.229Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/dakimura.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2020-07-27T06:08:35.000Z","updated_at":"2024-06-19T10:18:40.338Z","dependencies_parsed_at":"2024-06-19T10:28:47.888Z","dependency_job_id":null,"html_url":"https://github.com/dakimura/partition","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dakimura%2Fpartition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dakimura%2Fpartition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dakimura%2Fpartition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dakimura%2Fpartition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dakimura","download_url":"https://codeload.github.com/dakimura/partition/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245191625,"owners_count":20575248,"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":"2024-10-14T17:48:57.358Z","updated_at":"2025-03-24T00:52:38.168Z","avatar_url":"https://github.com/dakimura.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Partition\n\nparition/ab package contains an implementation to partition your users to some groups for A/B testing.\n\n## Installation\n\n~~~~\ngo get \"github.com/dakimura/partition/ab\"\n~~~~\n\nOr you can manually git clone the repository to\n`$(go env GOPATH)/src/github.com/dakimura/partition`.\n\n## Usage\n\n```\npackage example\n\nimport \"github.com/dakimura/partition/ab\"\n\nfunc example() {\n\tabTest, _ := ab.NewTest(\n\t\t[]ab.Group{\n\t\t\t{ID: \"default\", TargetPercentage: 50,},\n\t\t\t{ID: \"GroupA\", TargetPercentage: 25,},\n\t\t\t{ID: \"GroupB\", TargetPercentage: 25,},\n\t\t},\n\t)\n\n\tuserID := \"Kimura Takuya\"\n\tgroup := abTest.GetGroup(userID)\n\tswitch group {\n\tcase \"GroupA\":\n\t\tprint(\"behavior 1\")\n\tcase \"GroupB\":\n\t\tprint(\"behavior 2\")\n\tdefault:\n\t\tprint(\"default behavior\")\n\t}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdakimura%2Fpartition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdakimura%2Fpartition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdakimura%2Fpartition/lists"}