{"action":"created","issue":{"url":"https://api.github.com/repos/michaelenger/sanntid/issues/1","labels_url":"https://api.github.com/repos/michaelenger/sanntid/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/michaelenger/sanntid/issues/1/comments","events_url":"https://api.github.com/repos/michaelenger/sanntid/issues/1/events","html_url":"https://github.com/michaelenger/sanntid/pull/1","id":58406963,"number":1,"title":"Restructure packages into \"main\" and \"ruter\"","user":{"login":"nifty","id":53583,"avatar_url":"https://avatars.githubusercontent.com/u/53583?v=3","gravatar_id":"","url":"https://api.github.com/users/nifty","html_url":"https://github.com/nifty","followers_url":"https://api.github.com/users/nifty/followers","following_url":"https://api.github.com/users/nifty/following{/other_user}","gists_url":"https://api.github.com/users/nifty/gists{/gist_id}","starred_url":"https://api.github.com/users/nifty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nifty/subscriptions","organizations_url":"https://api.github.com/users/nifty/orgs","repos_url":"https://api.github.com/users/nifty/repos","events_url":"https://api.github.com/users/nifty/events{/privacy}","received_events_url":"https://api.github.com/users/nifty/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-20T20:36:04Z","updated_at":"2015-02-20T21:45:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/michaelenger/sanntid/pulls/1","html_url":"https://github.com/michaelenger/sanntid/pull/1","diff_url":"https://github.com/michaelenger/sanntid/pull/1.diff","patch_url":"https://github.com/michaelenger/sanntid/pull/1.patch"},"body":"As far as I understand it, every \"thing\" (Go package, repository etc.) should\r\nhave a \"main\" package. I'm mostly going by example[1], where all the files at\r\nthe root are in \"main\" package, and all files in sub directories have their own\r\npackage.\r\n\r\nIt also makes it convenient when developing locally, as `go run main.go` expects\r\nthe entry point to be main:main (`main` function in `main` package).\r\n\r\n`RequestArrivalData` is renamed with a capital R, as that makes it a public\r\nfunction apparently[2]:\r\n\r\n > In Go if something starts with a capital letter that means other packages\r\n > (and programs) are able to see it\r\n\r\nIn reality, I just did this because I didn't realise soon enough that you had to\r\npass multiple files to `go run` to make it compile correctly with all the\r\nfunctions exported.\r\n\r\n[1]:https://github.com/hashicorp/terraform\r\n[2]:http://www.golang-book.com/11/index.htm#section1"},"comment":{"url":"https://api.github.com/repos/michaelenger/sanntid/issues/comments/75324799","html_url":"https://github.com/michaelenger/sanntid/pull/1#issuecomment-75324799","issue_url":"https://api.github.com/repos/michaelenger/sanntid/issues/1","id":75324799,"user":{"login":"michaelenger","id":626587,"avatar_url":"https://avatars.githubusercontent.com/u/626587?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelenger","html_url":"https://github.com/michaelenger","followers_url":"https://api.github.com/users/michaelenger/followers","following_url":"https://api.github.com/users/michaelenger/following{/other_user}","gists_url":"https://api.github.com/users/michaelenger/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelenger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelenger/subscriptions","organizations_url":"https://api.github.com/users/michaelenger/orgs","repos_url":"https://api.github.com/users/michaelenger/repos","events_url":"https://api.github.com/users/michaelenger/events{/privacy}","received_events_url":"https://api.github.com/users/michaelenger/received_events","type":"User","site_admin":false},"created_at":"2015-02-20T21:45:18Z","updated_at":"2015-02-20T21:45:18Z","body":"Hmm... how does this work if I want to treat it as a package which gets imported into another script? If I rename \"sanntid\" to \"main\", can I still write `go get github.com/michaelenger/sanntid` and use the `sanntid` package in another application?"}}