{"action":"closed","issue":{"url":"https://api.github.com/repos/golang/gddo/issues/416","repository_url":"https://api.github.com/repos/golang/gddo","labels_url":"https://api.github.com/repos/golang/gddo/issues/416/labels{/name}","comments_url":"https://api.github.com/repos/golang/gddo/issues/416/comments","events_url":"https://api.github.com/repos/golang/gddo/issues/416/events","html_url":"https://github.com/golang/gddo/issues/416","id":160657975,"number":416,"title":"Fix govet error in httputil/buster_test.go (copy lock value)","user":{"login":"dmitris","id":31205,"avatar_url":"https://avatars.githubusercontent.com/u/31205?v=3","gravatar_id":"","url":"https://api.github.com/users/dmitris","html_url":"https://github.com/dmitris","followers_url":"https://api.github.com/users/dmitris/followers","following_url":"https://api.github.com/users/dmitris/following{/other_user}","gists_url":"https://api.github.com/users/dmitris/gists{/gist_id}","starred_url":"https://api.github.com/users/dmitris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmitris/subscriptions","organizations_url":"https://api.github.com/users/dmitris/orgs","repos_url":"https://api.github.com/users/dmitris/repos","events_url":"https://api.github.com/users/dmitris/events{/privacy}","received_events_url":"https://api.github.com/users/dmitris/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-06-16T13:11:07Z","updated_at":"2016-06-21T05:11:53Z","closed_at":"2016-06-21T05:11:52Z","body":"Currently running `go tool vet .` on gddo code produces the following error in httputil/buster_test.go:\r\n```\r\n$ go tool vet .\r\nbuster_test.go:23: assignment copies lock value to cbs: httputil.CacheBusters contains sync.Mutex\r\n```\r\n\r\nwould it be OK to change the offending line in https://opensource.git.corp.yahoo.com/golang/gddo/blob/master/httputil/buster_test.go#L23\r\n```\r\ncbs = CacheBusters{Handler: ss.FileHandler(\"buster_test.go\")}\r\n```\r\nto `cbs.Handler = ss.FileHandler(\"buster_test.go\")` ?  The tests run fine.\r\n\r\nAnother possibility would be to create a new variable ex. `cbs2` instead of reusing `cbs`, with the diff of two lines:\r\n\r\n```diff\r\n-       cbs = CacheBusters{Handler: ss.FileHandler(\"buster_test.go\")}\r\n+       cbs2 := CacheBusters{Handler: ss.FileHandler(\"buster_test.go\")}\r\n\r\n-       token = cbs.Get(\"/xxx\")\r\n+       token = cbs2.Get(\"/xxx\")\r\n```\r\n\r\n`go tool vet` issues cause a problem for CI systems that fail the builds on vet errors (when building local versions of \"gddo\" using this codebase).\r\n\r\nI'd be happy to submit a change, let me know if it wold be ok and if you have any preferences in terms of the options above.  Thanks."}}
{"actor":{"display_login":"shurcooL"}}