{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/14529","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/14529/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/14529/comments","events_url":"https://api.github.com/repos/golang/go/issues/14529/events","html_url":"https://github.com/golang/go/issues/14529","id":136773204,"number":14529,"title":"cmd/vet: teach vet that putting a large value in an interface makes a copy","user":{"login":"josharian","id":67496,"avatar_url":"https://avatars.githubusercontent.com/u/67496?v=3","gravatar_id":"","url":"https://api.github.com/users/josharian","html_url":"https://github.com/josharian","followers_url":"https://api.github.com/users/josharian/followers","following_url":"https://api.github.com/users/josharian/following{/other_user}","gists_url":"https://api.github.com/users/josharian/gists{/gist_id}","starred_url":"https://api.github.com/users/josharian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josharian/subscriptions","organizations_url":"https://api.github.com/users/josharian/orgs","repos_url":"https://api.github.com/users/josharian/repos","events_url":"https://api.github.com/users/josharian/events{/privacy}","received_events_url":"https://api.github.com/users/josharian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/6","html_url":"https://github.com/golang/go/milestones/Unplanned","labels_url":"https://api.github.com/repos/golang/go/milestones/6/labels","id":1055141,"number":6,"title":"Unplanned","description":"No plan to fix in any specific release.\r\n","creator":{"login":"rsc","id":104030,"avatar_url":"https://avatars.githubusercontent.com/u/104030?v=3","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"open_issues":1237,"closed_issues":287,"state":"open","created_at":"2015-04-06T20:47:19Z","updated_at":"2016-03-18T00:47:06Z","due_on":"2099-12-31T05:00:00Z","closed_at":null},"comments":5,"created_at":"2016-02-26T18:19:06Z","updated_at":"2016-03-18T09:29:38Z","closed_at":null,"body":"```go\r\npackage main\r\n\r\nimport \"sync\"\r\n\r\ntype T struct {\r\n\tsync.Mutex\r\n\t_ [4]byte\r\n}\r\n\r\nfunc main() {\r\n\tvar t T\r\n\r\n\tvar s T\r\n\ts = t\r\n\r\n\tvar e interface{}\r\n\te = t\r\n}\r\n```\r\n\r\n```bash\r\n$ go vet x.go\r\nx.go:14: assignment copies lock value to s: main.T\r\nexit status 1\r\n```\r\n\r\nvet should also complain about the assignment `e = t`, since it also copies t's value.\r\n"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/198274588","html_url":"https://github.com/golang/go/issues/14529#issuecomment-198274588","issue_url":"https://api.github.com/repos/golang/go/issues/14529","id":198274588,"user":{"login":"valyala","id":283442,"avatar_url":"https://avatars.githubusercontent.com/u/283442?v=3","gravatar_id":"","url":"https://api.github.com/users/valyala","html_url":"https://github.com/valyala","followers_url":"https://api.github.com/users/valyala/followers","following_url":"https://api.github.com/users/valyala/following{/other_user}","gists_url":"https://api.github.com/users/valyala/gists{/gist_id}","starred_url":"https://api.github.com/users/valyala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valyala/subscriptions","organizations_url":"https://api.github.com/users/valyala/orgs","repos_url":"https://api.github.com/users/valyala/repos","events_url":"https://api.github.com/users/valyala/events{/privacy}","received_events_url":"https://api.github.com/users/valyala/received_events","type":"User","site_admin":false},"created_at":"2016-03-18T09:29:38Z","updated_at":"2016-03-18T09:29:38Z","body":"Prepared a CL, which expands copylock check to function calls and return values - see https://go-review.googlesource.com/20832 . This catches passing lock into `interface{}`."}}