{"action":"created","comment":{"url":"https://api.github.com/repos/Clever/aviator/pulls/comments/28387554","id":28387554,"diff_hunk":"@@ -88,6 +89,16 @@ func main() {\n \t\tos.Exit(0)\n \t}\n \n+\tif *whereis != \"\" {\n+\t\tif service, ok := av.Services()[*whereis]; ok {\n+\t\t\tfmt.Println(service.Setups[\"default\"].Directory)","path":"main.go","position":14,"original_position":14,"commit_id":"5af663956e234a0e2d8c0ff4ea28bf9ae9744bb1","original_commit_id":"5af663956e234a0e2d8c0ff4ea28bf9ae9744bb1","user":{"login":"dfuentes","id":388569,"avatar_url":"https://avatars.githubusercontent.com/u/388569?v=3","gravatar_id":"","url":"https://api.github.com/users/dfuentes","html_url":"https://github.com/dfuentes","followers_url":"https://api.github.com/users/dfuentes/followers","following_url":"https://api.github.com/users/dfuentes/following{/other_user}","gists_url":"https://api.github.com/users/dfuentes/gists{/gist_id}","starred_url":"https://api.github.com/users/dfuentes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dfuentes/subscriptions","organizations_url":"https://api.github.com/users/dfuentes/orgs","repos_url":"https://api.github.com/users/dfuentes/repos","events_url":"https://api.github.com/users/dfuentes/events{/privacy}","received_events_url":"https://api.github.com/users/dfuentes/received_events","type":"User","site_admin":false},"body":"Unfortunately, not all aviator configs have a setup named \"default\".  Also, they can override the Directory attribute via yaml, so we can't be sure that the directory is actually the location of the config.\r\n\r\nI think a better way to do it would be to add a Path field to the Service struct, and populate it while loading the yaml configs.","created_at":"2015-04-15T01:34:18Z","updated_at":"2015-04-15T01:34:18Z","html_url":"https://github.com/Clever/aviator/pull/41#discussion_r28387554","pull_request_url":"https://api.github.com/repos/Clever/aviator/pulls/41","_links":{"self":{"href":"https://api.github.com/repos/Clever/aviator/pulls/comments/28387554"},"html":{"href":"https://github.com/Clever/aviator/pull/41#discussion_r28387554"},"pull_request":{"href":"https://api.github.com/repos/Clever/aviator/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/Clever/aviator/pulls/41","id":33315393,"html_url":"https://github.com/Clever/aviator/pull/41","diff_url":"https://github.com/Clever/aviator/pull/41.diff","patch_url":"https://github.com/Clever/aviator/pull/41.patch","issue_url":"https://api.github.com/repos/Clever/aviator/issues/41","number":41,"state":"open","locked":false,"title":"Created whereis flag that prints the path to the aviator.yml file that defines service","user":{"login":"xavi-","id":75434,"avatar_url":"https://avatars.githubusercontent.com/u/75434?v=3","gravatar_id":"","url":"https://api.github.com/users/xavi-","html_url":"https://github.com/xavi-","followers_url":"https://api.github.com/users/xavi-/followers","following_url":"https://api.github.com/users/xavi-/following{/other_user}","gists_url":"https://api.github.com/users/xavi-/gists{/gist_id}","starred_url":"https://api.github.com/users/xavi-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xavi-/subscriptions","organizations_url":"https://api.github.com/users/xavi-/orgs","repos_url":"https://api.github.com/users/xavi-/repos","events_url":"https://api.github.com/users/xavi-/events{/privacy}","received_events_url":"https://api.github.com/users/xavi-/received_events","type":"User","site_admin":false},"body":"Makes it easier to understand how and where services are laid out at clever.  Here's a usage example:\r\n\r\n```\r\naviator -whereis=il_mongodb\r\n```","created_at":"2015-04-15T01:23:05Z","updated_at":"2015-04-15T01:34:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"472ffbaa66fea248b923daa9422cf35c69fd86fb","assignee":{"login":"dfuentes","id":388569,"avatar_url":"https://avatars.githubusercontent.com/u/388569?v=3","gravatar_id":"","url":"https://api.github.com/users/dfuentes","html_url":"https://github.com/dfuentes","followers_url":"https://api.github.com/users/dfuentes/followers","following_url":"https://api.github.com/users/dfuentes/following{/other_user}","gists_url":"https://api.github.com/users/dfuentes/gists{/gist_id}","starred_url":"https://api.github.com/users/dfuentes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dfuentes/subscriptions","organizations_url":"https://api.github.com/users/dfuentes/orgs","repos_url":"https://api.github.com/users/dfuentes/repos","events_url":"https://api.github.com/users/dfuentes/events{/privacy}","received_events_url":"https://api.github.com/users/dfuentes/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Clever/aviator/pulls/41/commits","review_comments_url":"https://api.github.com/repos/Clever/aviator/pulls/41/comments","review_comment_url":"https://api.github.com/repos/Clever/aviator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Clever/aviator/issues/41/comments","statuses_url":"https://api.github.com/repos/Clever/aviator/statuses/5af663956e234a0e2d8c0ff4ea28bf9ae9744bb1","head":{"label":"Clever:add-whereis-flag","ref":"add-whereis-flag","sha":"5af663956e234a0e2d8c0ff4ea28bf9ae9744bb1","user":{"login":"Clever","id":1885509,"avatar_url":"https://avatars.githubusercontent.com/u/1885509?v=3","gravatar_id":"","url":"https://api.github.com/users/Clever","html_url":"https://github.com/Clever","followers_url":"https://api.github.com/users/Clever/followers","following_url":"https://api.github.com/users/Clever/following{/other_user}","gists_url":"https://api.github.com/users/Clever/gists{/gist_id}","starred_url":"https://api.github.com/users/Clever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Clever/subscriptions","organizations_url":"https://api.github.com/users/Clever/orgs","repos_url":"https://api.github.com/users/Clever/repos","events_url":"https://api.github.com/users/Clever/events{/privacy}","received_events_url":"https://api.github.com/users/Clever/received_events","type":"Organization","site_admin":false},"repo":{"id":21252048,"name":"aviator","full_name":"Clever/aviator","owner":{"login":"Clever","id":1885509,"avatar_url":"https://avatars.githubusercontent.com/u/1885509?v=3","gravatar_id":"","url":"https://api.github.com/users/Clever","html_url":"https://github.com/Clever","followers_url":"https://api.github.com/users/Clever/followers","following_url":"https://api.github.com/users/Clever/following{/other_user}","gists_url":"https://api.github.com/users/Clever/gists{/gist_id}","starred_url":"https://api.github.com/users/Clever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Clever/subscriptions","organizations_url":"https://api.github.com/users/Clever/orgs","repos_url":"https://api.github.com/users/Clever/repos","events_url":"https://api.github.com/users/Clever/events{/privacy}","received_events_url":"https://api.github.com/users/Clever/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Clever/aviator","description":"Dependent service launching on localhost","fork":false,"url":"https://api.github.com/repos/Clever/aviator","forks_url":"https://api.github.com/repos/Clever/aviator/forks","keys_url":"https://api.github.com/repos/Clever/aviator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Clever/aviator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Clever/aviator/teams","hooks_url":"https://api.github.com/repos/Clever/aviator/hooks","issue_events_url":"https://api.github.com/repos/Clever/aviator/issues/events{/number}","events_url":"https://api.github.com/repos/Clever/aviator/events","assignees_url":"https://api.github.com/repos/Clever/aviator/assignees{/user}","branches_url":"https://api.github.com/repos/Clever/aviator/branches{/branch}","tags_url":"https://api.github.com/repos/Clever/aviator/tags","blobs_url":"https://api.github.com/repos/Clever/aviator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Clever/aviator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Clever/aviator/git/refs{/sha}","trees_url":"https://api.github.com/repos/Clever/aviator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Clever/aviator/statuses/{sha}","languages_url":"https://api.github.com/repos/Clever/aviator/languages","stargazers_url":"https://api.github.com/repos/Clever/aviator/stargazers","contributors_url":"https://api.github.com/repos/Clever/aviator/contributors","subscribers_url":"https://api.github.com/repos/Clever/aviator/subscribers","subscription_url":"https://api.github.com/repos/Clever/aviator/subscription","commits_url":"https://api.github.com/repos/Clever/aviator/commits{/sha}","git_commits_url":"https://api.github.com/repos/Clever/aviator/git/commits{/sha}","comments_url":"https://api.github.com/repos/Clever/aviator/comments{/number}","issue_comment_url":"https://api.github.com/repos/Clever/aviator/issues/comments{/number}","contents_url":"https://api.github.com/repos/Clever/aviator/contents/{+path}","compare_url":"https://api.github.com/repos/Clever/aviator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Clever/aviator/merges","archive_url":"https://api.github.com/repos/Clever/aviator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Clever/aviator/downloads","issues_url":"https://api.github.com/repos/Clever/aviator/issues{/number}","pulls_url":"https://api.github.com/repos/Clever/aviator/pulls{/number}","milestones_url":"https://api.github.com/repos/Clever/aviator/milestones{/number}","notifications_url":"https://api.github.com/repos/Clever/aviator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Clever/aviator/labels{/name}","releases_url":"https://api.github.com/repos/Clever/aviator/releases{/id}","created_at":"2014-06-26T19:20:57Z","updated_at":"2015-04-13T21:39:34Z","pushed_at":"2015-04-15T01:23:05Z","git_url":"git://github.com/Clever/aviator.git","ssh_url":"git@github.com:Clever/aviator.git","clone_url":"https://github.com/Clever/aviator.git","svn_url":"https://github.com/Clever/aviator","homepage":null,"size":776,"stargazers_count":23,"watchers_count":23,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":23,"default_branch":"master"}},"base":{"label":"Clever:master","ref":"master","sha":"73f730ca6da8415eb94e761dcf727fb99fa173e4","user":{"login":"Clever","id":1885509,"avatar_url":"https://avatars.githubusercontent.com/u/1885509?v=3","gravatar_id":"","url":"https://api.github.com/users/Clever","html_url":"https://github.com/Clever","followers_url":"https://api.github.com/users/Clever/followers","following_url":"https://api.github.com/users/Clever/following{/other_user}","gists_url":"https://api.github.com/users/Clever/gists{/gist_id}","starred_url":"https://api.github.com/users/Clever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Clever/subscriptions","organizations_url":"https://api.github.com/users/Clever/orgs","repos_url":"https://api.github.com/users/Clever/repos","events_url":"https://api.github.com/users/Clever/events{/privacy}","received_events_url":"https://api.github.com/users/Clever/received_events","type":"Organization","site_admin":false},"repo":{"id":21252048,"name":"aviator","full_name":"Clever/aviator","owner":{"login":"Clever","id":1885509,"avatar_url":"https://avatars.githubusercontent.com/u/1885509?v=3","gravatar_id":"","url":"https://api.github.com/users/Clever","html_url":"https://github.com/Clever","followers_url":"https://api.github.com/users/Clever/followers","following_url":"https://api.github.com/users/Clever/following{/other_user}","gists_url":"https://api.github.com/users/Clever/gists{/gist_id}","starred_url":"https://api.github.com/users/Clever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Clever/subscriptions","organizations_url":"https://api.github.com/users/Clever/orgs","repos_url":"https://api.github.com/users/Clever/repos","events_url":"https://api.github.com/users/Clever/events{/privacy}","received_events_url":"https://api.github.com/users/Clever/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Clever/aviator","description":"Dependent service launching on localhost","fork":false,"url":"https://api.github.com/repos/Clever/aviator","forks_url":"https://api.github.com/repos/Clever/aviator/forks","keys_url":"https://api.github.com/repos/Clever/aviator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Clever/aviator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Clever/aviator/teams","hooks_url":"https://api.github.com/repos/Clever/aviator/hooks","issue_events_url":"https://api.github.com/repos/Clever/aviator/issues/events{/number}","events_url":"https://api.github.com/repos/Clever/aviator/events","assignees_url":"https://api.github.com/repos/Clever/aviator/assignees{/user}","branches_url":"https://api.github.com/repos/Clever/aviator/branches{/branch}","tags_url":"https://api.github.com/repos/Clever/aviator/tags","blobs_url":"https://api.github.com/repos/Clever/aviator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Clever/aviator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Clever/aviator/git/refs{/sha}","trees_url":"https://api.github.com/repos/Clever/aviator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Clever/aviator/statuses/{sha}","languages_url":"https://api.github.com/repos/Clever/aviator/languages","stargazers_url":"https://api.github.com/repos/Clever/aviator/stargazers","contributors_url":"https://api.github.com/repos/Clever/aviator/contributors","subscribers_url":"https://api.github.com/repos/Clever/aviator/subscribers","subscription_url":"https://api.github.com/repos/Clever/aviator/subscription","commits_url":"https://api.github.com/repos/Clever/aviator/commits{/sha}","git_commits_url":"https://api.github.com/repos/Clever/aviator/git/commits{/sha}","comments_url":"https://api.github.com/repos/Clever/aviator/comments{/number}","issue_comment_url":"https://api.github.com/repos/Clever/aviator/issues/comments{/number}","contents_url":"https://api.github.com/repos/Clever/aviator/contents/{+path}","compare_url":"https://api.github.com/repos/Clever/aviator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Clever/aviator/merges","archive_url":"https://api.github.com/repos/Clever/aviator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Clever/aviator/downloads","issues_url":"https://api.github.com/repos/Clever/aviator/issues{/number}","pulls_url":"https://api.github.com/repos/Clever/aviator/pulls{/number}","milestones_url":"https://api.github.com/repos/Clever/aviator/milestones{/number}","notifications_url":"https://api.github.com/repos/Clever/aviator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Clever/aviator/labels{/name}","releases_url":"https://api.github.com/repos/Clever/aviator/releases{/id}","created_at":"2014-06-26T19:20:57Z","updated_at":"2015-04-13T21:39:34Z","pushed_at":"2015-04-15T01:23:05Z","git_url":"git://github.com/Clever/aviator.git","ssh_url":"git@github.com:Clever/aviator.git","clone_url":"https://github.com/Clever/aviator.git","svn_url":"https://github.com/Clever/aviator","homepage":null,"size":776,"stargazers_count":23,"watchers_count":23,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Clever/aviator/pulls/41"},"html":{"href":"https://github.com/Clever/aviator/pull/41"},"issue":{"href":"https://api.github.com/repos/Clever/aviator/issues/41"},"comments":{"href":"https://api.github.com/repos/Clever/aviator/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/Clever/aviator/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/Clever/aviator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Clever/aviator/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/Clever/aviator/statuses/5af663956e234a0e2d8c0ff4ea28bf9ae9744bb1"}}}}