{"action":"created","comment":{"url":"https://api.github.com/repos/manifoldco/torus-cli/pulls/comments/87794623","pull_request_review_id":8391006,"id":87794623,"diff_hunk":"@@ -48,24 +53,74 @@ func viewCmd(ctx *cli.Context) error {\n \t\treturn err\n \t}\n \n-\tverbose := ctx.Bool(\"verbose\")\n-\tif verbose {\n-\t\tfmt.Printf(\"Credential path: %s\\n\\n\", path)\n+\tformat := ctx.String(\"format\")\n+\tif ctx.Bool(\"verbose\") {\n+\t\tformat = \"verbose\"\n+\t}","path":"cmd/view.go","position":40,"original_position":40,"commit_id":"302051de28094d106a4ba169862c70c976147041","original_commit_id":"302051de28094d106a4ba169862c70c976147041","user":{"login":"ianlivingstone","id":191893,"avatar_url":"https://avatars.githubusercontent.com/u/191893?v=3","gravatar_id":"","url":"https://api.github.com/users/ianlivingstone","html_url":"https://github.com/ianlivingstone","followers_url":"https://api.github.com/users/ianlivingstone/followers","following_url":"https://api.github.com/users/ianlivingstone/following{/other_user}","gists_url":"https://api.github.com/users/ianlivingstone/gists{/gist_id}","starred_url":"https://api.github.com/users/ianlivingstone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianlivingstone/subscriptions","organizations_url":"https://api.github.com/users/ianlivingstone/orgs","repos_url":"https://api.github.com/users/ianlivingstone/repos","events_url":"https://api.github.com/users/ianlivingstone/events{/privacy}","received_events_url":"https://api.github.com/users/ianlivingstone/received_events","type":"User","site_admin":false},"body":"`--verbose` should take precedence, I had it throw a usage error if you used both but the help explicitly states `--verbose` is the same as `--format verbose`.\r\n\r\n","created_at":"2016-11-14T12:52:15Z","updated_at":"2016-11-14T12:52:15Z","html_url":"https://github.com/manifoldco/torus-cli/pull/54#discussion_r87794623","pull_request_url":"https://api.github.com/repos/manifoldco/torus-cli/pulls/54","_links":{"self":{"href":"https://api.github.com/repos/manifoldco/torus-cli/pulls/comments/87794623"},"html":{"href":"https://github.com/manifoldco/torus-cli/pull/54#discussion_r87794623"},"pull_request":{"href":"https://api.github.com/repos/manifoldco/torus-cli/pulls/54"}}},"pull_request":{"url":"https://api.github.com/repos/manifoldco/torus-cli/pulls/54","id":93493814,"html_url":"https://github.com/manifoldco/torus-cli/pull/54","diff_url":"https://github.com/manifoldco/torus-cli/pull/54.diff","patch_url":"https://github.com/manifoldco/torus-cli/pull/54.patch","issue_url":"https://api.github.com/repos/manifoldco/torus-cli/issues/54","number":54,"state":"open","locked":false,"title":"Add --format option to view (json, env, verbose)","user":{"login":"ianlivingstone","id":191893,"avatar_url":"https://avatars.githubusercontent.com/u/191893?v=3","gravatar_id":"","url":"https://api.github.com/users/ianlivingstone","html_url":"https://github.com/ianlivingstone","followers_url":"https://api.github.com/users/ianlivingstone/followers","following_url":"https://api.github.com/users/ianlivingstone/following{/other_user}","gists_url":"https://api.github.com/users/ianlivingstone/gists{/gist_id}","starred_url":"https://api.github.com/users/ianlivingstone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianlivingstone/subscriptions","organizations_url":"https://api.github.com/users/ianlivingstone/orgs","repos_url":"https://api.github.com/users/ianlivingstone/repos","events_url":"https://api.github.com/users/ianlivingstone/events{/privacy}","received_events_url":"https://api.github.com/users/ianlivingstone/received_events","type":"User","site_admin":false},"body":"## Summary\r\n\r\nImplement `--format` supporting `env, json, and verbose` for displaying\r\nsecrets with the default being (env).\r\n\r\n## Example Usage\r\n\r\n```\r\n$ torus help view\r\nNAME:\r\n   torus view - View secrets for the current service and environment\r\n\r\nUSAGE:\r\n   torus view [command options]\r\n\r\nCATEGORY:\r\n   SECRETS\r\n\r\nOPTIONS:\r\n   --org ORG, -o ORG                 Use this organization.\r\n   --project PROJECT, -p PROJECT     Use this project.\r\n   --environment ENV, -e ENV         Use this environment.\r\n   --service SERVICE, -s SERVICE     Use this service. (default: default)\r\n   --user USER, -u USER              Use this user.\r\n   --machine MACHINE, -m MACHINE     Use this machine.\r\n   --instance INSTANCE, -i INSTANCE  Use this instance. (default: 1)\r\n   --format FORMAT, -f FORMAT        Format used to display data (json, env, verbose) (default: env)\r\n   --verbose, -v                     Lists the sources of the secrets (shortcut for --format verbose)\r\n$ torus view\r\nSECRETSRUS=sdfsf\r\n$ torus view --format verbose\r\nCredential path: /iantestagained/jackandjill/dev-ian/default/ian/1\r\n\r\nSECRETSRUS=sdfsf  /iantestagained/jackandjill/[dev-ian|production]/default/*/*/secretsrus\r\n$ torus view --format json -v\r\nCredential path: /iantestagained/jackandjill/dev-ian/default/ian/1\r\n\r\nSECRETSRUS=sdfsf  /iantestagained/jackandjill/[dev-ian|production]/default/*/*/secretsrus\r\n$ torus view --format json\r\n{\r\n  \"secretsrus\": \"sdfsf\"\r\n}\r\n$ torus view --format jsfsd\r\nUnknown format: jsfsd.\r\nUsage:\r\n    torus view [command options]\r\n```\r\n\r\nRelated manifoldco/torus-cli#51","created_at":"2016-11-14T00:19:47Z","updated_at":"2016-11-14T12:52:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"85726026bcda516e58c65ac46599336908b477b2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/manifoldco/torus-cli/pulls/54/commits","review_comments_url":"https://api.github.com/repos/manifoldco/torus-cli/pulls/54/comments","review_comment_url":"https://api.github.com/repos/manifoldco/torus-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/manifoldco/torus-cli/issues/54/comments","statuses_url":"https://api.github.com/repos/manifoldco/torus-cli/statuses/302051de28094d106a4ba169862c70c976147041","head":{"label":"manifoldco:view-format-flag","ref":"view-format-flag","sha":"302051de28094d106a4ba169862c70c976147041","user":{"login":"manifoldco","id":16501525,"avatar_url":"https://avatars.githubusercontent.com/u/16501525?v=3","gravatar_id":"","url":"https://api.github.com/users/manifoldco","html_url":"https://github.com/manifoldco","followers_url":"https://api.github.com/users/manifoldco/followers","following_url":"https://api.github.com/users/manifoldco/following{/other_user}","gists_url":"https://api.github.com/users/manifoldco/gists{/gist_id}","starred_url":"https://api.github.com/users/manifoldco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manifoldco/subscriptions","organizations_url":"https://api.github.com/users/manifoldco/orgs","repos_url":"https://api.github.com/users/manifoldco/repos","events_url":"https://api.github.com/users/manifoldco/events{/privacy}","received_events_url":"https://api.github.com/users/manifoldco/received_events","type":"Organization","site_admin":false},"repo":{"id":72035075,"name":"torus-cli","full_name":"manifoldco/torus-cli","owner":{"login":"manifoldco","id":16501525,"avatar_url":"https://avatars.githubusercontent.com/u/16501525?v=3","gravatar_id":"","url":"https://api.github.com/users/manifoldco","html_url":"https://github.com/manifoldco","followers_url":"https://api.github.com/users/manifoldco/followers","following_url":"https://api.github.com/users/manifoldco/following{/other_user}","gists_url":"https://api.github.com/users/manifoldco/gists{/gist_id}","starred_url":"https://api.github.com/users/manifoldco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manifoldco/subscriptions","organizations_url":"https://api.github.com/users/manifoldco/orgs","repos_url":"https://api.github.com/users/manifoldco/repos","events_url":"https://api.github.com/users/manifoldco/events{/privacy}","received_events_url":"https://api.github.com/users/manifoldco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/manifoldco/torus-cli","description":"A secure, shared workspace for secrets","fork":false,"url":"https://api.github.com/repos/manifoldco/torus-cli","forks_url":"https://api.github.com/repos/manifoldco/torus-cli/forks","keys_url":"https://api.github.com/repos/manifoldco/torus-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manifoldco/torus-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manifoldco/torus-cli/teams","hooks_url":"https://api.github.com/repos/manifoldco/torus-cli/hooks","issue_events_url":"https://api.github.com/repos/manifoldco/torus-cli/issues/events{/number}","events_url":"https://api.github.com/repos/manifoldco/torus-cli/events","assignees_url":"https://api.github.com/repos/manifoldco/torus-cli/assignees{/user}","branches_url":"https://api.github.com/repos/manifoldco/torus-cli/branches{/branch}","tags_url":"https://api.github.com/repos/manifoldco/torus-cli/tags","blobs_url":"https://api.github.com/repos/manifoldco/torus-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manifoldco/torus-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manifoldco/torus-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/manifoldco/torus-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manifoldco/torus-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/manifoldco/torus-cli/languages","stargazers_url":"https://api.github.com/repos/manifoldco/torus-cli/stargazers","contributors_url":"https://api.github.com/repos/manifoldco/torus-cli/contributors","subscribers_url":"https://api.github.com/repos/manifoldco/torus-cli/subscribers","subscription_url":"https://api.github.com/repos/manifoldco/torus-cli/subscription","commits_url":"https://api.github.com/repos/manifoldco/torus-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/manifoldco/torus-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/manifoldco/torus-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/manifoldco/torus-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/manifoldco/torus-cli/contents/{+path}","compare_url":"https://api.github.com/repos/manifoldco/torus-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manifoldco/torus-cli/merges","archive_url":"https://api.github.com/repos/manifoldco/torus-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manifoldco/torus-cli/downloads","issues_url":"https://api.github.com/repos/manifoldco/torus-cli/issues{/number}","pulls_url":"https://api.github.com/repos/manifoldco/torus-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/manifoldco/torus-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/manifoldco/torus-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manifoldco/torus-cli/labels{/name}","releases_url":"https://api.github.com/repos/manifoldco/torus-cli/releases{/id}","deployments_url":"https://api.github.com/repos/manifoldco/torus-cli/deployments","created_at":"2016-10-26T19:00:16Z","updated_at":"2016-11-13T21:38:30Z","pushed_at":"2016-11-14T03:07:42Z","git_url":"git://github.com/manifoldco/torus-cli.git","ssh_url":"git@github.com:manifoldco/torus-cli.git","clone_url":"https://github.com/manifoldco/torus-cli.git","svn_url":"https://github.com/manifoldco/torus-cli","homepage":"https://torus.sh","size":1477,"stargazers_count":108,"watchers_count":108,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":9,"forks":6,"open_issues":9,"watchers":108,"default_branch":"master"}},"base":{"label":"manifoldco:master","ref":"master","sha":"943bfee73938fa06b914959d42ac25709a7cc75b","user":{"login":"manifoldco","id":16501525,"avatar_url":"https://avatars.githubusercontent.com/u/16501525?v=3","gravatar_id":"","url":"https://api.github.com/users/manifoldco","html_url":"https://github.com/manifoldco","followers_url":"https://api.github.com/users/manifoldco/followers","following_url":"https://api.github.com/users/manifoldco/following{/other_user}","gists_url":"https://api.github.com/users/manifoldco/gists{/gist_id}","starred_url":"https://api.github.com/users/manifoldco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manifoldco/subscriptions","organizations_url":"https://api.github.com/users/manifoldco/orgs","repos_url":"https://api.github.com/users/manifoldco/repos","events_url":"https://api.github.com/users/manifoldco/events{/privacy}","received_events_url":"https://api.github.com/users/manifoldco/received_events","type":"Organization","site_admin":false},"repo":{"id":72035075,"name":"torus-cli","full_name":"manifoldco/torus-cli","owner":{"login":"manifoldco","id":16501525,"avatar_url":"https://avatars.githubusercontent.com/u/16501525?v=3","gravatar_id":"","url":"https://api.github.com/users/manifoldco","html_url":"https://github.com/manifoldco","followers_url":"https://api.github.com/users/manifoldco/followers","following_url":"https://api.github.com/users/manifoldco/following{/other_user}","gists_url":"https://api.github.com/users/manifoldco/gists{/gist_id}","starred_url":"https://api.github.com/users/manifoldco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manifoldco/subscriptions","organizations_url":"https://api.github.com/users/manifoldco/orgs","repos_url":"https://api.github.com/users/manifoldco/repos","events_url":"https://api.github.com/users/manifoldco/events{/privacy}","received_events_url":"https://api.github.com/users/manifoldco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/manifoldco/torus-cli","description":"A secure, shared workspace for secrets","fork":false,"url":"https://api.github.com/repos/manifoldco/torus-cli","forks_url":"https://api.github.com/repos/manifoldco/torus-cli/forks","keys_url":"https://api.github.com/repos/manifoldco/torus-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manifoldco/torus-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manifoldco/torus-cli/teams","hooks_url":"https://api.github.com/repos/manifoldco/torus-cli/hooks","issue_events_url":"https://api.github.com/repos/manifoldco/torus-cli/issues/events{/number}","events_url":"https://api.github.com/repos/manifoldco/torus-cli/events","assignees_url":"https://api.github.com/repos/manifoldco/torus-cli/assignees{/user}","branches_url":"https://api.github.com/repos/manifoldco/torus-cli/branches{/branch}","tags_url":"https://api.github.com/repos/manifoldco/torus-cli/tags","blobs_url":"https://api.github.com/repos/manifoldco/torus-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manifoldco/torus-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manifoldco/torus-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/manifoldco/torus-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manifoldco/torus-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/manifoldco/torus-cli/languages","stargazers_url":"https://api.github.com/repos/manifoldco/torus-cli/stargazers","contributors_url":"https://api.github.com/repos/manifoldco/torus-cli/contributors","subscribers_url":"https://api.github.com/repos/manifoldco/torus-cli/subscribers","subscription_url":"https://api.github.com/repos/manifoldco/torus-cli/subscription","commits_url":"https://api.github.com/repos/manifoldco/torus-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/manifoldco/torus-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/manifoldco/torus-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/manifoldco/torus-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/manifoldco/torus-cli/contents/{+path}","compare_url":"https://api.github.com/repos/manifoldco/torus-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manifoldco/torus-cli/merges","archive_url":"https://api.github.com/repos/manifoldco/torus-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manifoldco/torus-cli/downloads","issues_url":"https://api.github.com/repos/manifoldco/torus-cli/issues{/number}","pulls_url":"https://api.github.com/repos/manifoldco/torus-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/manifoldco/torus-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/manifoldco/torus-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manifoldco/torus-cli/labels{/name}","releases_url":"https://api.github.com/repos/manifoldco/torus-cli/releases{/id}","deployments_url":"https://api.github.com/repos/manifoldco/torus-cli/deployments","created_at":"2016-10-26T19:00:16Z","updated_at":"2016-11-13T21:38:30Z","pushed_at":"2016-11-14T03:07:42Z","git_url":"git://github.com/manifoldco/torus-cli.git","ssh_url":"git@github.com:manifoldco/torus-cli.git","clone_url":"https://github.com/manifoldco/torus-cli.git","svn_url":"https://github.com/manifoldco/torus-cli","homepage":"https://torus.sh","size":1477,"stargazers_count":108,"watchers_count":108,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":9,"forks":6,"open_issues":9,"watchers":108,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/manifoldco/torus-cli/pulls/54"},"html":{"href":"https://github.com/manifoldco/torus-cli/pull/54"},"issue":{"href":"https://api.github.com/repos/manifoldco/torus-cli/issues/54"},"comments":{"href":"https://api.github.com/repos/manifoldco/torus-cli/issues/54/comments"},"review_comments":{"href":"https://api.github.com/repos/manifoldco/torus-cli/pulls/54/comments"},"review_comment":{"href":"https://api.github.com/repos/manifoldco/torus-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/manifoldco/torus-cli/pulls/54/commits"},"statuses":{"href":"https://api.github.com/repos/manifoldco/torus-cli/statuses/302051de28094d106a4ba169862c70c976147041"}}}}
{"actor":{"display_login":"ianlivingstone"}}