{"action":"created","issue":{"url":"https://api.github.com/repos/tehsphinx/exalysis/issues/41","repository_url":"https://api.github.com/repos/tehsphinx/exalysis","labels_url":"https://api.github.com/repos/tehsphinx/exalysis/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/tehsphinx/exalysis/issues/41/comments","events_url":"https://api.github.com/repos/tehsphinx/exalysis/issues/41/events","html_url":"https://github.com/tehsphinx/exalysis/issues/41","id":386587570,"node_id":"MDU6SXNzdWUzODY1ODc1NzA=","number":41,"title":"Raindrops: handle tightly-coupled solutions","user":{"login":"bitfield","id":142262,"node_id":"MDQ6VXNlcjE0MjI2Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/142262?v=4","gravatar_id":"","url":"https://api.github.com/users/bitfield","html_url":"https://github.com/bitfield","followers_url":"https://api.github.com/users/bitfield/followers","following_url":"https://api.github.com/users/bitfield/following{/other_user}","gists_url":"https://api.github.com/users/bitfield/gists{/gist_id}","starred_url":"https://api.github.com/users/bitfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitfield/subscriptions","organizations_url":"https://api.github.com/users/bitfield/orgs","repos_url":"https://api.github.com/users/bitfield/repos","events_url":"https://api.github.com/users/bitfield/events{/privacy}","received_events_url":"https://api.github.com/users/bitfield/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-02T18:51:45Z","updated_at":"2018-12-03T07:45:08Z","closed_at":null,"author_association":"COLLABORATOR","body":"```go\r\npackage raindrops\r\n\r\nimport (\r\n\t\"strconv\"\r\n)\r\n\r\n//Convert turns integers into string based on factor\r\nfunc Convert(a int) string {\r\n\r\n\tfactor := []int{3, 5, 7}\r\n\r\n\tthree := \"Pling\"\r\n\tfive := \"Plang\"\r\n\tseven := \"Plong\"\r\n\r\n\tif a%factor[0] == 0 && a%factor[1] == 0 && a%factor[2] == 0 {\r\n\t\treturn three + five + seven\r\n\t}\r\n\tif a%factor[0] == 0 && a%factor[1] == 0 {\r\n\t\treturn three + five\r\n\t}\r\n\tif a%factor[0] == 0 && a%factor[2] == 0 {\r\n\t\treturn three + seven\r\n\t}\r\n\tif a%factor[0] == 0 {\r\n\t\treturn three\r\n\t}\r\n\tif a%factor[1] == 0 && a%factor[2] == 0 {\r\n\t\treturn five + seven\r\n\t}\r\n\r\n\tif a%factor[1] == 0 {\r\n\t\treturn five\r\n\t}\r\n\tif a%factor[2] == 0 {\r\n\t\treturn seven\r\n\t}\r\n\r\n\treturn strconv.Itoa(a)\r\n}\r\n```\r\n\r\n(solution 1270d9243ac843fdbc6599187b506d3a)"},"comment":{"url":"https://api.github.com/repos/tehsphinx/exalysis/issues/comments/443617176","html_url":"https://github.com/tehsphinx/exalysis/issues/41#issuecomment-443617176","issue_url":"https://api.github.com/repos/tehsphinx/exalysis/issues/41","id":443617176,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MzYxNzE3Ng==","user":{"login":"tehsphinx","id":6624571,"node_id":"MDQ6VXNlcjY2MjQ1NzE=","avatar_url":"https://avatars0.githubusercontent.com/u/6624571?v=4","gravatar_id":"","url":"https://api.github.com/users/tehsphinx","html_url":"https://github.com/tehsphinx","followers_url":"https://api.github.com/users/tehsphinx/followers","following_url":"https://api.github.com/users/tehsphinx/following{/other_user}","gists_url":"https://api.github.com/users/tehsphinx/gists{/gist_id}","starred_url":"https://api.github.com/users/tehsphinx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tehsphinx/subscriptions","organizations_url":"https://api.github.com/users/tehsphinx/orgs","repos_url":"https://api.github.com/users/tehsphinx/repos","events_url":"https://api.github.com/users/tehsphinx/events{/privacy}","received_events_url":"https://api.github.com/users/tehsphinx/received_events","type":"User","site_admin":false},"created_at":"2018-12-03T07:45:08Z","updated_at":"2018-12-03T07:45:08Z","author_association":"OWNER","body":"The PR adds this comment to the response:\r\n\r\n- Although this solution passes the tests, it's a little too tightly coupled to the specific cases. If you imagine what changes you'd have to make to add a new case, you can see this code would rapidly become difficult to maintain. Can you find a way to make it more flexible, but still simple? (Hint: you can append to strings using the `+=` operator.)\r\n"}}
{"actor":{"display_login":"tehsphinx"}}