{"action":"created","issue":{"url":"https://api.github.com/repos/alphagov/govuk_crawler_worker/issues/88","labels_url":"https://api.github.com/repos/alphagov/govuk_crawler_worker/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/alphagov/govuk_crawler_worker/issues/88/comments","events_url":"https://api.github.com/repos/alphagov/govuk_crawler_worker/issues/88/events","html_url":"https://github.com/alphagov/govuk_crawler_worker/pull/88","id":58705933,"number":88,"title":"Remove dot imports","user":{"login":"mattbostock","id":4348848,"avatar_url":"https://avatars.githubusercontent.com/u/4348848?v=3","gravatar_id":"","url":"https://api.github.com/users/mattbostock","html_url":"https://github.com/mattbostock","followers_url":"https://api.github.com/users/mattbostock/followers","following_url":"https://api.github.com/users/mattbostock/following{/other_user}","gists_url":"https://api.github.com/users/mattbostock/gists{/gist_id}","starred_url":"https://api.github.com/users/mattbostock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattbostock/subscriptions","organizations_url":"https://api.github.com/users/mattbostock/orgs","repos_url":"https://api.github.com/users/mattbostock/repos","events_url":"https://api.github.com/users/mattbostock/events{/privacy}","received_events_url":"https://api.github.com/users/mattbostock/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-24T08:07:44Z","updated_at":"2015-02-24T09:56:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/alphagov/govuk_crawler_worker/pulls/88","html_url":"https://github.com/alphagov/govuk_crawler_worker/pull/88","diff_url":"https://github.com/alphagov/govuk_crawler_worker/pull/88.diff","patch_url":"https://github.com/alphagov/govuk_crawler_worker/pull/88.patch"},"body":"Dot imports are discouraged because they make it difficult to determine\r\nto which package an identifier belongs. By properly namespacing the\r\ncode, it's easier to understand how each package is used.\r\n\r\nSee:\r\nhttps://github.com/golang/go/wiki/CodeReviewComments#import-dot\r\n\r\n> Except for this one case, do not use import . in your programs. It\r\n> makes the programs much harder to read because it is unclear whether a\r\n> name like Quux is a top-level identifier in the current package or in\r\n> an imported package.\r\n\r\nNote that I've not removed the 'dot import' for the Ginkgo or Gomega packages as I think it would make the tests harder to read and add unnecessary boilerplate."},"comment":{"url":"https://api.github.com/repos/alphagov/govuk_crawler_worker/issues/comments/75728013","html_url":"https://github.com/alphagov/govuk_crawler_worker/pull/88#issuecomment-75728013","issue_url":"https://api.github.com/repos/alphagov/govuk_crawler_worker/issues/88","id":75728013,"user":{"login":"mattbostock","id":4348848,"avatar_url":"https://avatars.githubusercontent.com/u/4348848?v=3","gravatar_id":"","url":"https://api.github.com/users/mattbostock","html_url":"https://github.com/mattbostock","followers_url":"https://api.github.com/users/mattbostock/followers","following_url":"https://api.github.com/users/mattbostock/following{/other_user}","gists_url":"https://api.github.com/users/mattbostock/gists{/gist_id}","starred_url":"https://api.github.com/users/mattbostock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattbostock/subscriptions","organizations_url":"https://api.github.com/users/mattbostock/orgs","repos_url":"https://api.github.com/users/mattbostock/repos","events_url":"https://api.github.com/users/mattbostock/events{/privacy}","received_events_url":"https://api.github.com/users/mattbostock/received_events","type":"User","site_admin":false},"created_at":"2015-02-24T09:56:35Z","updated_at":"2015-02-24T09:56:35Z","body":"That's not quite right, the tests in c6c6e34 are in the `main_test` package; we wouldn't be able to import `github.com/alphagov/govuk_crawler_worker` otherwise."}}