{"action":"created","comment":{"url":"https://api.github.com/repos/src-d/guide/pulls/comments/186356548","pull_request_review_id":117916642,"id":186356548,"diff_hunk":"@@ -62,4 +57,10 @@ A blank line is usually added after the end of any control structure, too.\n \n ### Naming\n \n-* Prefer full names (e.g. `Repository`, not `Repo`).\n\\ No newline at end of file\n+* Prefer full names (e.g. `Repository`, not `Repo`).\n+\n+## CLI\n+\n+* Put sources for your executable commands in `cmd/<command-name>/main.go`.\n+* We use [go-flags](https://github.com/jessevdk/go-flags) extensively for CLI options parsing.\n+* Implement commands in a subpackage ([example](https://github.com/src-d/gitbase/blob/master/cli/gitbase/cmd/server.go)).","path":"engineering/conventions-go.md","position":24,"original_position":24,"commit_id":"68106c261bc674de5ae55f14cda8b831ff390761","original_commit_id":"68106c261bc674de5ae55f14cda8b831ff390761","user":{"login":"smola","id":23248,"avatar_url":"https://avatars1.githubusercontent.com/u/23248?v=4","gravatar_id":"","url":"https://api.github.com/users/smola","html_url":"https://github.com/smola","followers_url":"https://api.github.com/users/smola/followers","following_url":"https://api.github.com/users/smola/following{/other_user}","gists_url":"https://api.github.com/users/smola/gists{/gist_id}","starred_url":"https://api.github.com/users/smola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smola/subscriptions","organizations_url":"https://api.github.com/users/smola/orgs","repos_url":"https://api.github.com/users/smola/repos","events_url":"https://api.github.com/users/smola/events{/privacy}","received_events_url":"https://api.github.com/users/smola/received_events","type":"User","site_admin":false},"body":"@ajnavarro Ok. Once the PR is merged I'll update the link. Or maybe there is a better example?","created_at":"2018-05-07T08:17:34Z","updated_at":"2018-05-07T08:17:34Z","html_url":"https://github.com/src-d/guide/pull/215#discussion_r186356548","pull_request_url":"https://api.github.com/repos/src-d/guide/pulls/215","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/src-d/guide/pulls/comments/186356548"},"html":{"href":"https://github.com/src-d/guide/pull/215#discussion_r186356548"},"pull_request":{"href":"https://api.github.com/repos/src-d/guide/pulls/215"}},"in_reply_to_id":186103804},"pull_request":{"url":"https://api.github.com/repos/src-d/guide/pulls/215","id":185935897,"html_url":"https://github.com/src-d/guide/pull/215","diff_url":"https://github.com/src-d/guide/pull/215.diff","patch_url":"https://github.com/src-d/guide/pull/215.patch","issue_url":"https://api.github.com/repos/src-d/guide/issues/215","number":215,"state":"open","locked":false,"title":"engineering: add cli conventions","user":{"login":"smola","id":23248,"avatar_url":"https://avatars1.githubusercontent.com/u/23248?v=4","gravatar_id":"","url":"https://api.github.com/users/smola","html_url":"https://github.com/smola","followers_url":"https://api.github.com/users/smola/followers","following_url":"https://api.github.com/users/smola/following{/other_user}","gists_url":"https://api.github.com/users/smola/gists{/gist_id}","starred_url":"https://api.github.com/users/smola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smola/subscriptions","organizations_url":"https://api.github.com/users/smola/orgs","repos_url":"https://api.github.com/users/smola/repos","events_url":"https://api.github.com/users/smola/events{/privacy}","received_events_url":"https://api.github.com/users/smola/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Santiago M. Mola <santi@mola.io>","created_at":"2018-05-04T09:44:57Z","updated_at":"2018-05-07T08:17:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"07ca7834ee55d3012343413aa9bf012309a0e1a4","assignee":null,"assignees":[],"requested_reviewers":[{"login":"dennwc","id":676724,"avatar_url":"https://avatars3.githubusercontent.com/u/676724?v=4","gravatar_id":"","url":"https://api.github.com/users/dennwc","html_url":"https://github.com/dennwc","followers_url":"https://api.github.com/users/dennwc/followers","following_url":"https://api.github.com/users/dennwc/following{/other_user}","gists_url":"https://api.github.com/users/dennwc/gists{/gist_id}","starred_url":"https://api.github.com/users/dennwc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dennwc/subscriptions","organizations_url":"https://api.github.com/users/dennwc/orgs","repos_url":"https://api.github.com/users/dennwc/repos","events_url":"https://api.github.com/users/dennwc/events{/privacy}","received_events_url":"https://api.github.com/users/dennwc/received_events","type":"User","site_admin":false},{"login":"mcuadros","id":1573114,"avatar_url":"https://avatars0.githubusercontent.com/u/1573114?v=4","gravatar_id":"","url":"https://api.github.com/users/mcuadros","html_url":"https://github.com/mcuadros","followers_url":"https://api.github.com/users/mcuadros/followers","following_url":"https://api.github.com/users/mcuadros/following{/other_user}","gists_url":"https://api.github.com/users/mcuadros/gists{/gist_id}","starred_url":"https://api.github.com/users/mcuadros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcuadros/subscriptions","organizations_url":"https://api.github.com/users/mcuadros/orgs","repos_url":"https://api.github.com/users/mcuadros/repos","events_url":"https://api.github.com/users/mcuadros/events{/privacy}","received_events_url":"https://api.github.com/users/mcuadros/received_events","type":"User","site_admin":false},{"login":"vmarkovtsev","id":2793551,"avatar_url":"https://avatars3.githubusercontent.com/u/2793551?v=4","gravatar_id":"","url":"https://api.github.com/users/vmarkovtsev","html_url":"https://github.com/vmarkovtsev","followers_url":"https://api.github.com/users/vmarkovtsev/followers","following_url":"https://api.github.com/users/vmarkovtsev/following{/other_user}","gists_url":"https://api.github.com/users/vmarkovtsev/gists{/gist_id}","starred_url":"https://api.github.com/users/vmarkovtsev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmarkovtsev/subscriptions","organizations_url":"https://api.github.com/users/vmarkovtsev/orgs","repos_url":"https://api.github.com/users/vmarkovtsev/repos","events_url":"https://api.github.com/users/vmarkovtsev/events{/privacy}","received_events_url":"https://api.github.com/users/vmarkovtsev/received_events","type":"User","site_admin":false},{"login":"bzz","id":5582506,"avatar_url":"https://avatars3.githubusercontent.com/u/5582506?v=4","gravatar_id":"","url":"https://api.github.com/users/bzz","html_url":"https://github.com/bzz","followers_url":"https://api.github.com/users/bzz/followers","following_url":"https://api.github.com/users/bzz/following{/other_user}","gists_url":"https://api.github.com/users/bzz/gists{/gist_id}","starred_url":"https://api.github.com/users/bzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bzz/subscriptions","organizations_url":"https://api.github.com/users/bzz/orgs","repos_url":"https://api.github.com/users/bzz/repos","events_url":"https://api.github.com/users/bzz/events{/privacy}","received_events_url":"https://api.github.com/users/bzz/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/src-d/guide/pulls/215/commits","review_comments_url":"https://api.github.com/repos/src-d/guide/pulls/215/comments","review_comment_url":"https://api.github.com/repos/src-d/guide/pulls/comments{/number}","comments_url":"https://api.github.com/repos/src-d/guide/issues/215/comments","statuses_url":"https://api.github.com/repos/src-d/guide/statuses/68106c261bc674de5ae55f14cda8b831ff390761","head":{"label":"smola:cli","ref":"cli","sha":"68106c261bc674de5ae55f14cda8b831ff390761","user":{"login":"smola","id":23248,"avatar_url":"https://avatars1.githubusercontent.com/u/23248?v=4","gravatar_id":"","url":"https://api.github.com/users/smola","html_url":"https://github.com/smola","followers_url":"https://api.github.com/users/smola/followers","following_url":"https://api.github.com/users/smola/following{/other_user}","gists_url":"https://api.github.com/users/smola/gists{/gist_id}","starred_url":"https://api.github.com/users/smola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smola/subscriptions","organizations_url":"https://api.github.com/users/smola/orgs","repos_url":"https://api.github.com/users/smola/repos","events_url":"https://api.github.com/users/smola/events{/privacy}","received_events_url":"https://api.github.com/users/smola/received_events","type":"User","site_admin":false},"repo":{"id":89599052,"name":"tutorial","full_name":"smola/tutorial","owner":{"login":"smola","id":23248,"avatar_url":"https://avatars1.githubusercontent.com/u/23248?v=4","gravatar_id":"","url":"https://api.github.com/users/smola","html_url":"https://github.com/smola","followers_url":"https://api.github.com/users/smola/followers","following_url":"https://api.github.com/users/smola/following{/other_user}","gists_url":"https://api.github.com/users/smola/gists{/gist_id}","starred_url":"https://api.github.com/users/smola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smola/subscriptions","organizations_url":"https://api.github.com/users/smola/orgs","repos_url":"https://api.github.com/users/smola/repos","events_url":"https://api.github.com/users/smola/events{/privacy}","received_events_url":"https://api.github.com/users/smola/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/smola/tutorial","description":"All information about how it's like to work here.","fork":true,"url":"https://api.github.com/repos/smola/tutorial","forks_url":"https://api.github.com/repos/smola/tutorial/forks","keys_url":"https://api.github.com/repos/smola/tutorial/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smola/tutorial/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smola/tutorial/teams","hooks_url":"https://api.github.com/repos/smola/tutorial/hooks","issue_events_url":"https://api.github.com/repos/smola/tutorial/issues/events{/number}","events_url":"https://api.github.com/repos/smola/tutorial/events","assignees_url":"https://api.github.com/repos/smola/tutorial/assignees{/user}","branches_url":"https://api.github.com/repos/smola/tutorial/branches{/branch}","tags_url":"https://api.github.com/repos/smola/tutorial/tags","blobs_url":"https://api.github.com/repos/smola/tutorial/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smola/tutorial/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smola/tutorial/git/refs{/sha}","trees_url":"https://api.github.com/repos/smola/tutorial/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smola/tutorial/statuses/{sha}","languages_url":"https://api.github.com/repos/smola/tutorial/languages","stargazers_url":"https://api.github.com/repos/smola/tutorial/stargazers","contributors_url":"https://api.github.com/repos/smola/tutorial/contributors","subscribers_url":"https://api.github.com/repos/smola/tutorial/subscribers","subscription_url":"https://api.github.com/repos/smola/tutorial/subscription","commits_url":"https://api.github.com/repos/smola/tutorial/commits{/sha}","git_commits_url":"https://api.github.com/repos/smola/tutorial/git/commits{/sha}","comments_url":"https://api.github.com/repos/smola/tutorial/comments{/number}","issue_comment_url":"https://api.github.com/repos/smola/tutorial/issues/comments{/number}","contents_url":"https://api.github.com/repos/smola/tutorial/contents/{+path}","compare_url":"https://api.github.com/repos/smola/tutorial/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smola/tutorial/merges","archive_url":"https://api.github.com/repos/smola/tutorial/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smola/tutorial/downloads","issues_url":"https://api.github.com/repos/smola/tutorial/issues{/number}","pulls_url":"https://api.github.com/repos/smola/tutorial/pulls{/number}","milestones_url":"https://api.github.com/repos/smola/tutorial/milestones{/number}","notifications_url":"https://api.github.com/repos/smola/tutorial/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smola/tutorial/labels{/name}","releases_url":"https://api.github.com/repos/smola/tutorial/releases{/id}","deployments_url":"https://api.github.com/repos/smola/tutorial/deployments","created_at":"2017-04-27T13:12:52Z","updated_at":"2017-04-27T12:09:41Z","pushed_at":"2018-05-04T10:09:05Z","git_url":"git://github.com/smola/tutorial.git","ssh_url":"git@github.com:smola/tutorial.git","clone_url":"https://github.com/smola/tutorial.git","svn_url":"https://github.com/smola/tutorial","homepage":"","size":2516,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"src-d:master","ref":"master","sha":"3cc64eed9334a1358b90822e02df0dc4573d3347","user":{"login":"src-d","id":15128793,"avatar_url":"https://avatars2.githubusercontent.com/u/15128793?v=4","gravatar_id":"","url":"https://api.github.com/users/src-d","html_url":"https://github.com/src-d","followers_url":"https://api.github.com/users/src-d/followers","following_url":"https://api.github.com/users/src-d/following{/other_user}","gists_url":"https://api.github.com/users/src-d/gists{/gist_id}","starred_url":"https://api.github.com/users/src-d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/src-d/subscriptions","organizations_url":"https://api.github.com/users/src-d/orgs","repos_url":"https://api.github.com/users/src-d/repos","events_url":"https://api.github.com/users/src-d/events{/privacy}","received_events_url":"https://api.github.com/users/src-d/received_events","type":"Organization","site_admin":false},"repo":{"id":84983543,"name":"guide","full_name":"src-d/guide","owner":{"login":"src-d","id":15128793,"avatar_url":"https://avatars2.githubusercontent.com/u/15128793?v=4","gravatar_id":"","url":"https://api.github.com/users/src-d","html_url":"https://github.com/src-d","followers_url":"https://api.github.com/users/src-d/followers","following_url":"https://api.github.com/users/src-d/following{/other_user}","gists_url":"https://api.github.com/users/src-d/gists{/gist_id}","starred_url":"https://api.github.com/users/src-d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/src-d/subscriptions","organizations_url":"https://api.github.com/users/src-d/orgs","repos_url":"https://api.github.com/users/src-d/repos","events_url":"https://api.github.com/users/src-d/events{/privacy}","received_events_url":"https://api.github.com/users/src-d/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/src-d/guide","description":"Aiming to be a fully transparent company. All information about source{d} and what it's like to work here.","fork":false,"url":"https://api.github.com/repos/src-d/guide","forks_url":"https://api.github.com/repos/src-d/guide/forks","keys_url":"https://api.github.com/repos/src-d/guide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/src-d/guide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/src-d/guide/teams","hooks_url":"https://api.github.com/repos/src-d/guide/hooks","issue_events_url":"https://api.github.com/repos/src-d/guide/issues/events{/number}","events_url":"https://api.github.com/repos/src-d/guide/events","assignees_url":"https://api.github.com/repos/src-d/guide/assignees{/user}","branches_url":"https://api.github.com/repos/src-d/guide/branches{/branch}","tags_url":"https://api.github.com/repos/src-d/guide/tags","blobs_url":"https://api.github.com/repos/src-d/guide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/src-d/guide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/src-d/guide/git/refs{/sha}","trees_url":"https://api.github.com/repos/src-d/guide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/src-d/guide/statuses/{sha}","languages_url":"https://api.github.com/repos/src-d/guide/languages","stargazers_url":"https://api.github.com/repos/src-d/guide/stargazers","contributors_url":"https://api.github.com/repos/src-d/guide/contributors","subscribers_url":"https://api.github.com/repos/src-d/guide/subscribers","subscription_url":"https://api.github.com/repos/src-d/guide/subscription","commits_url":"https://api.github.com/repos/src-d/guide/commits{/sha}","git_commits_url":"https://api.github.com/repos/src-d/guide/git/commits{/sha}","comments_url":"https://api.github.com/repos/src-d/guide/comments{/number}","issue_comment_url":"https://api.github.com/repos/src-d/guide/issues/comments{/number}","contents_url":"https://api.github.com/repos/src-d/guide/contents/{+path}","compare_url":"https://api.github.com/repos/src-d/guide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/src-d/guide/merges","archive_url":"https://api.github.com/repos/src-d/guide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/src-d/guide/downloads","issues_url":"https://api.github.com/repos/src-d/guide/issues{/number}","pulls_url":"https://api.github.com/repos/src-d/guide/pulls{/number}","milestones_url":"https://api.github.com/repos/src-d/guide/milestones{/number}","notifications_url":"https://api.github.com/repos/src-d/guide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/src-d/guide/labels{/name}","releases_url":"https://api.github.com/repos/src-d/guide/releases{/id}","deployments_url":"https://api.github.com/repos/src-d/guide/deployments","created_at":"2017-03-14T18:26:24Z","updated_at":"2018-05-06T11:49:40Z","pushed_at":"2018-05-04T10:16:57Z","git_url":"git://github.com/src-d/guide.git","ssh_url":"git@github.com:src-d/guide.git","clone_url":"https://github.com/src-d/guide.git","svn_url":"https://github.com/src-d/guide","homepage":"","size":2578,"stargazers_count":68,"watchers_count":68,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"archived":false,"open_issues_count":19,"license":null,"forks":32,"open_issues":19,"watchers":68,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/src-d/guide/pulls/215"},"html":{"href":"https://github.com/src-d/guide/pull/215"},"issue":{"href":"https://api.github.com/repos/src-d/guide/issues/215"},"comments":{"href":"https://api.github.com/repos/src-d/guide/issues/215/comments"},"review_comments":{"href":"https://api.github.com/repos/src-d/guide/pulls/215/comments"},"review_comment":{"href":"https://api.github.com/repos/src-d/guide/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/src-d/guide/pulls/215/commits"},"statuses":{"href":"https://api.github.com/repos/src-d/guide/statuses/68106c261bc674de5ae55f14cda8b831ff390761"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"smola"}}