{"action":"created","issue":{"url":"https://api.github.com/repos/go-lang-plugin-org/go-lang-idea-plugin/issues/2034","labels_url":"https://api.github.com/repos/go-lang-plugin-org/go-lang-idea-plugin/issues/2034/labels{/name}","comments_url":"https://api.github.com/repos/go-lang-plugin-org/go-lang-idea-plugin/issues/2034/comments","events_url":"https://api.github.com/repos/go-lang-plugin-org/go-lang-idea-plugin/issues/2034/events","html_url":"https://github.com/go-lang-plugin-org/go-lang-idea-plugin/issues/2034","id":118402780,"number":2034,"title":"Scope of main package should be per file","user":{"login":"mfinger","id":1695974,"avatar_url":"https://avatars.githubusercontent.com/u/1695974?v=3","gravatar_id":"","url":"https://api.github.com/users/mfinger","html_url":"https://github.com/mfinger","followers_url":"https://api.github.com/users/mfinger/followers","following_url":"https://api.github.com/users/mfinger/following{/other_user}","gists_url":"https://api.github.com/users/mfinger/gists{/gist_id}","starred_url":"https://api.github.com/users/mfinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfinger/subscriptions","organizations_url":"https://api.github.com/users/mfinger/orgs","repos_url":"https://api.github.com/users/mfinger/repos","events_url":"https://api.github.com/users/mfinger/events{/privacy}","received_events_url":"https://api.github.com/users/mfinger/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-11-23T15:18:08Z","updated_at":"2015-11-23T17:30:42Z","closed_at":"2015-11-23T17:29:07Z","body":"Firstly, love the plugin and use it all day long.  Great work.\r\n\r\nBut, I'm finding that the plugin is not handling the file level scoping of package main like go itself does.  It appears to be handling the main package like other packages which can cross many files.\r\n\r\nExample x.go:\r\n```\r\npackage main\r\n\r\nimport \"fmt\"\r\n\r\nfunc f(s string) {\r\n    fmt.Printf(\"%s\\n\", s);\r\n}\r\n\r\nfunc main() {\r\n    f(\"from x.go\");\r\n}\r\n```\r\n\r\nExample from y.go:\r\n```\r\npackage main\r\n\r\nfunc main() {\r\n    f(\"From y.go\");\r\n}\r\n```\r\n\r\nHere is how go reacts trying to build y.go:\r\n```\r\n% go build y.go\r\n# command-line-arguments\r\n./y.go:4: undefined: f\r\n```\r\n\r\nThe UI is not showing f() (from y.go) as undefined. Also, when I \"Goto Declaration\" from f() in y.go it takes me to the declaration in x.go.\r\n\r\nThe scope of package main is special and is limited to the current file.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/go-lang-plugin-org/go-lang-idea-plugin/issues/comments/159003969","html_url":"https://github.com/go-lang-plugin-org/go-lang-idea-plugin/issues/2034#issuecomment-159003969","issue_url":"https://api.github.com/repos/go-lang-plugin-org/go-lang-idea-plugin/issues/2034","id":159003969,"user":{"login":"zolotov","id":140920,"avatar_url":"https://avatars.githubusercontent.com/u/140920?v=3","gravatar_id":"","url":"https://api.github.com/users/zolotov","html_url":"https://github.com/zolotov","followers_url":"https://api.github.com/users/zolotov/followers","following_url":"https://api.github.com/users/zolotov/following{/other_user}","gists_url":"https://api.github.com/users/zolotov/gists{/gist_id}","starred_url":"https://api.github.com/users/zolotov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zolotov/subscriptions","organizations_url":"https://api.github.com/users/zolotov/orgs","repos_url":"https://api.github.com/users/zolotov/repos","events_url":"https://api.github.com/users/zolotov/events{/privacy}","received_events_url":"https://api.github.com/users/zolotov/received_events","type":"User","site_admin":false},"created_at":"2015-11-23T17:30:42Z","updated_at":"2015-11-23T17:30:42Z","body":"> there are many issues about the plugin not knowing how to compile multiple files in main\r\n\r\nFor example?"}}