{"action":"created","issue":{"url":"https://api.github.com/repos/tedsuo/ifrit/issues/30","repository_url":"https://api.github.com/repos/tedsuo/ifrit","labels_url":"https://api.github.com/repos/tedsuo/ifrit/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/tedsuo/ifrit/issues/30/comments","events_url":"https://api.github.com/repos/tedsuo/ifrit/issues/30/events","html_url":"https://github.com/tedsuo/ifrit/issues/30","id":347117653,"node_id":"MDU6SXNzdWUzNDcxMTc2NTM=","number":30,"title":"Iftrit v2: Boilerplate cleanup","user":{"login":"tedsuo","id":24074,"node_id":"MDQ6VXNlcjI0MDc0","avatar_url":"https://avatars2.githubusercontent.com/u/24074?v=4","gravatar_id":"","url":"https://api.github.com/users/tedsuo","html_url":"https://github.com/tedsuo","followers_url":"https://api.github.com/users/tedsuo/followers","following_url":"https://api.github.com/users/tedsuo/following{/other_user}","gists_url":"https://api.github.com/users/tedsuo/gists{/gist_id}","starred_url":"https://api.github.com/users/tedsuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tedsuo/subscriptions","organizations_url":"https://api.github.com/users/tedsuo/orgs","repos_url":"https://api.github.com/users/tedsuo/repos","events_url":"https://api.github.com/users/tedsuo/events{/privacy}","received_events_url":"https://api.github.com/users/tedsuo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-02T18:06:23Z","updated_at":"2018-08-02T18:45:37Z","closed_at":null,"author_association":"OWNER","body":"Ifrit currently does not have a version number, but let's call the current head of master `v1.0.0` for the purpose of this PR. There are a set of changes – which I never got around to making while at Pivotal – which I feel could clean up the boilerplate code in `main()` functions that use ifrit. This code is usuallly copy/pasted around, but it may improve on-boarding and comprehension to clean it up. \r\n\r\n* port `grouper` and `sigmon` packages into the main `ifrit` package. the additional package names create confusion when reading code, and they are almost always used together.\r\n* create a `ifrit.Main` method which wraps up the most common setup for ifrit into a single function.\r\n* allow `nil` members.\r\n* create an `ifrit.EventListener` interface (at least for use in `ifrit.Main`), which allows logging boilerplate to be shared.\r\n* write proper intro docs ;) \r\n* possibly there are other cleanups which could be included in the same push.\r\n\r\nExample of the above changes being applied:\r\nhttps://gist.github.com/tedsuo/1e99de0d465330526ff2\r\n\r\nPersonally, I find the end result to be much more readable. \r\n\r\nBy porting the new functionality to the main package, ifrit could remain backwards compatible simply by leaving the current packages alone.\r\n\r\n\r\n@nimakaviani @jvshahid @emalm since y’all make the heaviest use of ifrit, let me know if this of interest."},"comment":{"url":"https://api.github.com/repos/tedsuo/ifrit/issues/comments/410029011","html_url":"https://github.com/tedsuo/ifrit/issues/30#issuecomment-410029011","issue_url":"https://api.github.com/repos/tedsuo/ifrit/issues/30","id":410029011,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDAyOTAxMQ==","user":{"login":"jvshahid","id":297621,"node_id":"MDQ6VXNlcjI5NzYyMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/297621?v=4","gravatar_id":"","url":"https://api.github.com/users/jvshahid","html_url":"https://github.com/jvshahid","followers_url":"https://api.github.com/users/jvshahid/followers","following_url":"https://api.github.com/users/jvshahid/following{/other_user}","gists_url":"https://api.github.com/users/jvshahid/gists{/gist_id}","starred_url":"https://api.github.com/users/jvshahid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvshahid/subscriptions","organizations_url":"https://api.github.com/users/jvshahid/orgs","repos_url":"https://api.github.com/users/jvshahid/repos","events_url":"https://api.github.com/users/jvshahid/events{/privacy}","received_events_url":"https://api.github.com/users/jvshahid/received_events","type":"User","site_admin":false},"created_at":"2018-08-02T18:45:37Z","updated_at":"2018-08-02T18:45:37Z","author_association":"CONTRIBUTOR","body":"I like the change, specially allowing nil values and wrapping the boilerplate, but have a few minor comments:\r\n\r\n1. It is unclear what type of events will be emitted\r\n2. It is unclear whether the new design allows custom exit codes. Diego doesn't have different exit codes but other users might be interested in exiting with different codes depending on the error\r\n3. I would like to address the linter warnings that are usually printed in the members slice, because they use positional fields instead of setting them by name."}}
{"actor":{"display_login":"jvshahid"}}