{"action":"created","issue":{"url":"https://api.github.com/repos/syncthing/discosrv/issues/38","repository_url":"https://api.github.com/repos/syncthing/discosrv","labels_url":"https://api.github.com/repos/syncthing/discosrv/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/syncthing/discosrv/issues/38/comments","events_url":"https://api.github.com/repos/syncthing/discosrv/issues/38/events","html_url":"https://github.com/syncthing/discosrv/pull/38","id":142224490,"number":38,"title":"Defer fd.Close() (fixes #37)","user":{"login":"kc1212","id":1093806,"avatar_url":"https://avatars.githubusercontent.com/u/1093806?v=3","gravatar_id":"","url":"https://api.github.com/users/kc1212","html_url":"https://github.com/kc1212","followers_url":"https://api.github.com/users/kc1212/followers","following_url":"https://api.github.com/users/kc1212/following{/other_user}","gists_url":"https://api.github.com/users/kc1212/gists{/gist_id}","starred_url":"https://api.github.com/users/kc1212/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kc1212/subscriptions","organizations_url":"https://api.github.com/users/kc1212/orgs","repos_url":"https://api.github.com/users/kc1212/repos","events_url":"https://api.github.com/users/kc1212/events{/privacy}","received_events_url":"https://api.github.com/users/kc1212/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-21T00:12:11Z","updated_at":"2016-03-21T11:43:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/syncthing/discosrv/pulls/38","html_url":"https://github.com/syncthing/discosrv/pull/38","diff_url":"https://github.com/syncthing/discosrv/pull/38.diff","patch_url":"https://github.com/syncthing/discosrv/pull/38.patch"},"body":"Should be self explanatory, fixes #37 "},"comment":{"url":"https://api.github.com/repos/syncthing/discosrv/issues/comments/199236971","html_url":"https://github.com/syncthing/discosrv/pull/38#issuecomment-199236971","issue_url":"https://api.github.com/repos/syncthing/discosrv/issues/38","id":199236971,"user":{"login":"kc1212","id":1093806,"avatar_url":"https://avatars.githubusercontent.com/u/1093806?v=3","gravatar_id":"","url":"https://api.github.com/users/kc1212","html_url":"https://github.com/kc1212","followers_url":"https://api.github.com/users/kc1212/followers","following_url":"https://api.github.com/users/kc1212/following{/other_user}","gists_url":"https://api.github.com/users/kc1212/gists{/gist_id}","starred_url":"https://api.github.com/users/kc1212/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kc1212/subscriptions","organizations_url":"https://api.github.com/users/kc1212/orgs","repos_url":"https://api.github.com/users/kc1212/repos","events_url":"https://api.github.com/users/kc1212/events{/privacy}","received_events_url":"https://api.github.com/users/kc1212/received_events","type":"User","site_admin":false},"created_at":"2016-03-21T11:43:22Z","updated_at":"2016-03-21T11:43:22Z","body":"The function isn't propagating the error back to the caller, it only prints the error, so overwriting shouldn't cause a problem. With that said, there would be a problem if the function is changed later to return the error, I suppose it's better to keep the `err` variable within the deferred function's scope. "}}