{"action":"created","comment":{"url":"https://api.github.com/repos/launchdarkly/go-client/pulls/comments/59290569","id":59290569,"diff_hunk":"@@ -85,35 +92,56 @@ func bucketUser(user User, key, attr, salt string) float32 {\n }\n \n func (f FeatureFlag) EvaluateExplain(user User) (interface{}, *Explanation) {\n+\tindex, explanation := f.evaluateExplainIndex(user)\n+\n+\tif index == nil || *index >= len(f.Variations) {\n+\t\treturn nil, explanation\n+\t} else {","path":"flag.go","position":75,"original_position":75,"commit_id":"ad31e251d31fea9dd1bd4358b217eb6c0f1609b7","original_commit_id":"ad31e251d31fea9dd1bd4358b217eb6c0f1609b7","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"if block ends with a return statement, so drop this else and outdent its block","created_at":"2016-04-11T22:09:50Z","updated_at":"2016-04-11T22:09:50Z","html_url":"https://github.com/launchdarkly/go-client/pull/43#discussion_r59290569","pull_request_url":"https://api.github.com/repos/launchdarkly/go-client/pulls/43","_links":{"self":{"href":"https://api.github.com/repos/launchdarkly/go-client/pulls/comments/59290569"},"html":{"href":"https://github.com/launchdarkly/go-client/pull/43#discussion_r59290569"},"pull_request":{"href":"https://api.github.com/repos/launchdarkly/go-client/pulls/43"}}},"pull_request":{"url":"https://api.github.com/repos/launchdarkly/go-client/pulls/43","id":66070946,"html_url":"https://github.com/launchdarkly/go-client/pull/43","diff_url":"https://github.com/launchdarkly/go-client/pull/43.diff","patch_url":"https://github.com/launchdarkly/go-client/pull/43.patch","issue_url":"https://api.github.com/repos/launchdarkly/go-client/issues/43","number":43,"state":"open","locked":false,"title":"Add variations to the feature flag, and make all rules point to index…","user":{"login":"jkodumal","id":19426,"avatar_url":"https://avatars.githubusercontent.com/u/19426?v=3","gravatar_id":"","url":"https://api.github.com/users/jkodumal","html_url":"https://github.com/jkodumal","followers_url":"https://api.github.com/users/jkodumal/followers","following_url":"https://api.github.com/users/jkodumal/following{/other_user}","gists_url":"https://api.github.com/users/jkodumal/gists{/gist_id}","starred_url":"https://api.github.com/users/jkodumal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkodumal/subscriptions","organizations_url":"https://api.github.com/users/jkodumal/orgs","repos_url":"https://api.github.com/users/jkodumal/repos","events_url":"https://api.github.com/users/jkodumal/events{/privacy}","received_events_url":"https://api.github.com/users/jkodumal/received_events","type":"User","site_admin":false},"body":"…es in the variations array.","created_at":"2016-04-11T22:09:44Z","updated_at":"2016-04-11T22:09:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e8450770a0bbcdd702dd275c27375f30ddea8d3f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/launchdarkly/go-client/pulls/43/commits","review_comments_url":"https://api.github.com/repos/launchdarkly/go-client/pulls/43/comments","review_comment_url":"https://api.github.com/repos/launchdarkly/go-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/launchdarkly/go-client/issues/43/comments","statuses_url":"https://api.github.com/repos/launchdarkly/go-client/statuses/ad31e251d31fea9dd1bd4358b217eb6c0f1609b7","head":{"label":"launchdarkly:jko/flags2-changes","ref":"jko/flags2-changes","sha":"ad31e251d31fea9dd1bd4358b217eb6c0f1609b7","user":{"login":"launchdarkly","id":8039656,"avatar_url":"https://avatars.githubusercontent.com/u/8039656?v=3","gravatar_id":"","url":"https://api.github.com/users/launchdarkly","html_url":"https://github.com/launchdarkly","followers_url":"https://api.github.com/users/launchdarkly/followers","following_url":"https://api.github.com/users/launchdarkly/following{/other_user}","gists_url":"https://api.github.com/users/launchdarkly/gists{/gist_id}","starred_url":"https://api.github.com/users/launchdarkly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/launchdarkly/subscriptions","organizations_url":"https://api.github.com/users/launchdarkly/orgs","repos_url":"https://api.github.com/users/launchdarkly/repos","events_url":"https://api.github.com/users/launchdarkly/events{/privacy}","received_events_url":"https://api.github.com/users/launchdarkly/received_events","type":"Organization","site_admin":false},"repo":{"id":24306448,"name":"go-client","full_name":"launchdarkly/go-client","owner":{"login":"launchdarkly","id":8039656,"avatar_url":"https://avatars.githubusercontent.com/u/8039656?v=3","gravatar_id":"","url":"https://api.github.com/users/launchdarkly","html_url":"https://github.com/launchdarkly","followers_url":"https://api.github.com/users/launchdarkly/followers","following_url":"https://api.github.com/users/launchdarkly/following{/other_user}","gists_url":"https://api.github.com/users/launchdarkly/gists{/gist_id}","starred_url":"https://api.github.com/users/launchdarkly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/launchdarkly/subscriptions","organizations_url":"https://api.github.com/users/launchdarkly/orgs","repos_url":"https://api.github.com/users/launchdarkly/repos","events_url":"https://api.github.com/users/launchdarkly/events{/privacy}","received_events_url":"https://api.github.com/users/launchdarkly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/launchdarkly/go-client","description":"Golang SDK for LaunchDarkly","fork":false,"url":"https://api.github.com/repos/launchdarkly/go-client","forks_url":"https://api.github.com/repos/launchdarkly/go-client/forks","keys_url":"https://api.github.com/repos/launchdarkly/go-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/launchdarkly/go-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/launchdarkly/go-client/teams","hooks_url":"https://api.github.com/repos/launchdarkly/go-client/hooks","issue_events_url":"https://api.github.com/repos/launchdarkly/go-client/issues/events{/number}","events_url":"https://api.github.com/repos/launchdarkly/go-client/events","assignees_url":"https://api.github.com/repos/launchdarkly/go-client/assignees{/user}","branches_url":"https://api.github.com/repos/launchdarkly/go-client/branches{/branch}","tags_url":"https://api.github.com/repos/launchdarkly/go-client/tags","blobs_url":"https://api.github.com/repos/launchdarkly/go-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/launchdarkly/go-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/launchdarkly/go-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/launchdarkly/go-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/launchdarkly/go-client/statuses/{sha}","languages_url":"https://api.github.com/repos/launchdarkly/go-client/languages","stargazers_url":"https://api.github.com/repos/launchdarkly/go-client/stargazers","contributors_url":"https://api.github.com/repos/launchdarkly/go-client/contributors","subscribers_url":"https://api.github.com/repos/launchdarkly/go-client/subscribers","subscription_url":"https://api.github.com/repos/launchdarkly/go-client/subscription","commits_url":"https://api.github.com/repos/launchdarkly/go-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/launchdarkly/go-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/launchdarkly/go-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/launchdarkly/go-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/launchdarkly/go-client/contents/{+path}","compare_url":"https://api.github.com/repos/launchdarkly/go-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/launchdarkly/go-client/merges","archive_url":"https://api.github.com/repos/launchdarkly/go-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/launchdarkly/go-client/downloads","issues_url":"https://api.github.com/repos/launchdarkly/go-client/issues{/number}","pulls_url":"https://api.github.com/repos/launchdarkly/go-client/pulls{/number}","milestones_url":"https://api.github.com/repos/launchdarkly/go-client/milestones{/number}","notifications_url":"https://api.github.com/repos/launchdarkly/go-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/launchdarkly/go-client/labels{/name}","releases_url":"https://api.github.com/repos/launchdarkly/go-client/releases{/id}","deployments_url":"https://api.github.com/repos/launchdarkly/go-client/deployments","created_at":"2014-09-21T22:22:55Z","updated_at":"2016-03-24T12:18:33Z","pushed_at":"2016-04-11T22:09:44Z","git_url":"git://github.com/launchdarkly/go-client.git","ssh_url":"git@github.com:launchdarkly/go-client.git","clone_url":"https://github.com/launchdarkly/go-client.git","svn_url":"https://github.com/launchdarkly/go-client","homepage":null,"size":191,"stargazers_count":8,"watchers_count":8,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":8,"default_branch":"master"}},"base":{"label":"launchdarkly:master","ref":"master","sha":"2b87c61ef4ad41bfa36509265d6c4625028166e9","user":{"login":"launchdarkly","id":8039656,"avatar_url":"https://avatars.githubusercontent.com/u/8039656?v=3","gravatar_id":"","url":"https://api.github.com/users/launchdarkly","html_url":"https://github.com/launchdarkly","followers_url":"https://api.github.com/users/launchdarkly/followers","following_url":"https://api.github.com/users/launchdarkly/following{/other_user}","gists_url":"https://api.github.com/users/launchdarkly/gists{/gist_id}","starred_url":"https://api.github.com/users/launchdarkly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/launchdarkly/subscriptions","organizations_url":"https://api.github.com/users/launchdarkly/orgs","repos_url":"https://api.github.com/users/launchdarkly/repos","events_url":"https://api.github.com/users/launchdarkly/events{/privacy}","received_events_url":"https://api.github.com/users/launchdarkly/received_events","type":"Organization","site_admin":false},"repo":{"id":24306448,"name":"go-client","full_name":"launchdarkly/go-client","owner":{"login":"launchdarkly","id":8039656,"avatar_url":"https://avatars.githubusercontent.com/u/8039656?v=3","gravatar_id":"","url":"https://api.github.com/users/launchdarkly","html_url":"https://github.com/launchdarkly","followers_url":"https://api.github.com/users/launchdarkly/followers","following_url":"https://api.github.com/users/launchdarkly/following{/other_user}","gists_url":"https://api.github.com/users/launchdarkly/gists{/gist_id}","starred_url":"https://api.github.com/users/launchdarkly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/launchdarkly/subscriptions","organizations_url":"https://api.github.com/users/launchdarkly/orgs","repos_url":"https://api.github.com/users/launchdarkly/repos","events_url":"https://api.github.com/users/launchdarkly/events{/privacy}","received_events_url":"https://api.github.com/users/launchdarkly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/launchdarkly/go-client","description":"Golang SDK for LaunchDarkly","fork":false,"url":"https://api.github.com/repos/launchdarkly/go-client","forks_url":"https://api.github.com/repos/launchdarkly/go-client/forks","keys_url":"https://api.github.com/repos/launchdarkly/go-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/launchdarkly/go-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/launchdarkly/go-client/teams","hooks_url":"https://api.github.com/repos/launchdarkly/go-client/hooks","issue_events_url":"https://api.github.com/repos/launchdarkly/go-client/issues/events{/number}","events_url":"https://api.github.com/repos/launchdarkly/go-client/events","assignees_url":"https://api.github.com/repos/launchdarkly/go-client/assignees{/user}","branches_url":"https://api.github.com/repos/launchdarkly/go-client/branches{/branch}","tags_url":"https://api.github.com/repos/launchdarkly/go-client/tags","blobs_url":"https://api.github.com/repos/launchdarkly/go-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/launchdarkly/go-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/launchdarkly/go-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/launchdarkly/go-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/launchdarkly/go-client/statuses/{sha}","languages_url":"https://api.github.com/repos/launchdarkly/go-client/languages","stargazers_url":"https://api.github.com/repos/launchdarkly/go-client/stargazers","contributors_url":"https://api.github.com/repos/launchdarkly/go-client/contributors","subscribers_url":"https://api.github.com/repos/launchdarkly/go-client/subscribers","subscription_url":"https://api.github.com/repos/launchdarkly/go-client/subscription","commits_url":"https://api.github.com/repos/launchdarkly/go-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/launchdarkly/go-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/launchdarkly/go-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/launchdarkly/go-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/launchdarkly/go-client/contents/{+path}","compare_url":"https://api.github.com/repos/launchdarkly/go-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/launchdarkly/go-client/merges","archive_url":"https://api.github.com/repos/launchdarkly/go-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/launchdarkly/go-client/downloads","issues_url":"https://api.github.com/repos/launchdarkly/go-client/issues{/number}","pulls_url":"https://api.github.com/repos/launchdarkly/go-client/pulls{/number}","milestones_url":"https://api.github.com/repos/launchdarkly/go-client/milestones{/number}","notifications_url":"https://api.github.com/repos/launchdarkly/go-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/launchdarkly/go-client/labels{/name}","releases_url":"https://api.github.com/repos/launchdarkly/go-client/releases{/id}","deployments_url":"https://api.github.com/repos/launchdarkly/go-client/deployments","created_at":"2014-09-21T22:22:55Z","updated_at":"2016-03-24T12:18:33Z","pushed_at":"2016-04-11T22:09:44Z","git_url":"git://github.com/launchdarkly/go-client.git","ssh_url":"git@github.com:launchdarkly/go-client.git","clone_url":"https://github.com/launchdarkly/go-client.git","svn_url":"https://github.com/launchdarkly/go-client","homepage":null,"size":191,"stargazers_count":8,"watchers_count":8,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/launchdarkly/go-client/pulls/43"},"html":{"href":"https://github.com/launchdarkly/go-client/pull/43"},"issue":{"href":"https://api.github.com/repos/launchdarkly/go-client/issues/43"},"comments":{"href":"https://api.github.com/repos/launchdarkly/go-client/issues/43/comments"},"review_comments":{"href":"https://api.github.com/repos/launchdarkly/go-client/pulls/43/comments"},"review_comment":{"href":"https://api.github.com/repos/launchdarkly/go-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/launchdarkly/go-client/pulls/43/commits"},"statuses":{"href":"https://api.github.com/repos/launchdarkly/go-client/statuses/ad31e251d31fea9dd1bd4358b217eb6c0f1609b7"}}}}