{"action":"created","issue":{"url":"https://api.github.com/repos/constabulary/gb/issues/84","labels_url":"https://api.github.com/repos/constabulary/gb/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/constabulary/gb/issues/84/comments","events_url":"https://api.github.com/repos/constabulary/gb/issues/84/events","html_url":"https://github.com/constabulary/gb/pull/84","id":76086446,"number":84,"title":"Add import cycle detection","user":{"login":"mariokostelac","id":1917451,"avatar_url":"https://avatars.githubusercontent.com/u/1917451?v=3","gravatar_id":"","url":"https://api.github.com/users/mariokostelac","html_url":"https://github.com/mariokostelac","followers_url":"https://api.github.com/users/mariokostelac/followers","following_url":"https://api.github.com/users/mariokostelac/following{/other_user}","gists_url":"https://api.github.com/users/mariokostelac/gists{/gist_id}","starred_url":"https://api.github.com/users/mariokostelac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariokostelac/subscriptions","organizations_url":"https://api.github.com/users/mariokostelac/orgs","repos_url":"https://api.github.com/users/mariokostelac/repos","events_url":"https://api.github.com/users/mariokostelac/events{/privacy}","received_events_url":"https://api.github.com/users/mariokostelac/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-13T18:53:18Z","updated_at":"2015-05-14T08:34:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/constabulary/gb/pulls/84","html_url":"https://github.com/constabulary/gb/pull/84","diff_url":"https://github.com/constabulary/gb/pull/84.diff","patch_url":"https://github.com/constabulary/gb/pull/84.patch"},"body":"Since we do not use real stack, it does not seem obvious for me to detect a cycle of length longer than 2."},"comment":{"url":"https://api.github.com/repos/constabulary/gb/issues/comments/101971075","html_url":"https://github.com/constabulary/gb/pull/84#issuecomment-101971075","issue_url":"https://api.github.com/repos/constabulary/gb/issues/84","id":101971075,"user":{"login":"mariokostelac","id":1917451,"avatar_url":"https://avatars.githubusercontent.com/u/1917451?v=3","gravatar_id":"","url":"https://api.github.com/users/mariokostelac","html_url":"https://github.com/mariokostelac","followers_url":"https://api.github.com/users/mariokostelac/followers","following_url":"https://api.github.com/users/mariokostelac/following{/other_user}","gists_url":"https://api.github.com/users/mariokostelac/gists{/gist_id}","starred_url":"https://api.github.com/users/mariokostelac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariokostelac/subscriptions","organizations_url":"https://api.github.com/users/mariokostelac/orgs","repos_url":"https://api.github.com/users/mariokostelac/repos","events_url":"https://api.github.com/users/mariokostelac/events{/privacy}","received_events_url":"https://api.github.com/users/mariokostelac/received_events","type":"User","site_admin":false},"created_at":"2015-05-14T08:34:14Z","updated_at":"2015-05-14T08:34:14Z","body":"I've added tests for different cycle lengths (to cover it correctly from algorithm perspective) so we have 1, 2, 4.\r\n1 - edge case\r\n4 - to be sure that we are not stuck on detecting just the cycle of length 2 (I can imagine people forgetting about cycles longer than 2)\r\n\r\nI know that the way of testing if goroutine is not the nicest one, but using `time.AfterFunc` and asserting after a second did not work for me.\r\n\r\nAlso, if somebody know how to do error checking better, please teach me, I had to be sure that I am getting my error, not some other (like package not found)."}}