{"action":"created","issue":{"url":"https://api.github.com/repos/apex/apex/issues/385","repository_url":"https://api.github.com/repos/apex/apex","labels_url":"https://api.github.com/repos/apex/apex/issues/385/labels{/name}","comments_url":"https://api.github.com/repos/apex/apex/issues/385/comments","events_url":"https://api.github.com/repos/apex/apex/issues/385/events","html_url":"https://github.com/apex/apex/issues/385","id":151466960,"number":385,"title":"Refactor project.json generation in boot.go","user":{"login":"tobyjoe","id":15146,"avatar_url":"https://avatars.githubusercontent.com/u/15146?v=3","gravatar_id":"","url":"https://api.github.com/users/tobyjoe","html_url":"https://github.com/tobyjoe","followers_url":"https://api.github.com/users/tobyjoe/followers","following_url":"https://api.github.com/users/tobyjoe/following{/other_user}","gists_url":"https://api.github.com/users/tobyjoe/gists{/gist_id}","starred_url":"https://api.github.com/users/tobyjoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobyjoe/subscriptions","organizations_url":"https://api.github.com/users/tobyjoe/orgs","repos_url":"https://api.github.com/users/tobyjoe/repos","events_url":"https://api.github.com/users/tobyjoe/events{/privacy}","received_events_url":"https://api.github.com/users/tobyjoe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-27T19:09:55Z","updated_at":"2016-04-28T02:36:57Z","closed_at":null,"body":"The ```boot/boot.go``` file selects one of two templates for ```project.json``` when the ```apex init``` command is run: ```projectConfig``` when an IAM role is present; and ```projectConfigWithoutRole``` when no IAM role is present. They are meant to differ only by the presence of a role key, the ```defaultEnvironment``` key.\r\n\r\nAs implemented, it's a bit of a maintenance chore to keep the two JSON templates in sync if a change is made to the ```project.json``` format. \r\n\r\nSince the separation is only to handle an optional ```role``` value, I propose using ```text/template``` instead of ```fmt.Sprintf``` for the inline template and subsequent interpolation. \r\n\r\nI have a PR nearly-complete for this, in case it's a decision the maintainers support.\r\n"},"comment":{"url":"https://api.github.com/repos/apex/apex/issues/comments/215291444","html_url":"https://github.com/apex/apex/issues/385#issuecomment-215291444","issue_url":"https://api.github.com/repos/apex/apex/issues/385","id":215291444,"user":{"login":"tj","id":25254,"avatar_url":"https://avatars.githubusercontent.com/u/25254?v=3","gravatar_id":"","url":"https://api.github.com/users/tj","html_url":"https://github.com/tj","followers_url":"https://api.github.com/users/tj/followers","following_url":"https://api.github.com/users/tj/following{/other_user}","gists_url":"https://api.github.com/users/tj/gists{/gist_id}","starred_url":"https://api.github.com/users/tj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tj/subscriptions","organizations_url":"https://api.github.com/users/tj/orgs","repos_url":"https://api.github.com/users/tj/repos","events_url":"https://api.github.com/users/tj/events{/privacy}","received_events_url":"https://api.github.com/users/tj/received_events","type":"User","site_admin":false},"created_at":"2016-04-28T02:36:57Z","updated_at":"2016-04-28T02:36:57Z","body":"they're pretty tiny so it's not much work, but wouldn't hurt to have a template!"}}