{"action":"created","comment":{"url":"https://api.github.com/repos/uber/tchannel/pulls/comments/29539136","id":29539136,"diff_hunk":"@@ -21,27 +21,28 @@ package main\n // THE SOFTWARE.\n \n import (\n-\t\"code.google.com/p/getopt\"\n \t\"github.com/uber/tchannel/golang\"\n \t\"golang.org/x/net/context\"\n+\t\"flag\"\n \t\"os\"\n \t\"time\"\n )\n \n var log = tchannel.SimpleLogger\n \n-var peerAddr = getopt.StringLong(\"peer\", 'p', \"\", \"Host and port of remote peer\")\n-var serviceName = getopt.StringLong(\"service\", 's', \"\", \"Name of service to invoke\")\n-var operationName = getopt.StringLong(\"operation\", 'o', \"\", \"Name of operation to invoke\")\n-var arg2 = getopt.StringLong(\"arg2\", '2', \"\", \"Input for arg2.  Curl-style, use @foo.txt to read from foo.txt\")\n-var arg3 = getopt.StringLong(\"arg3\", '3', \"\", \"Input for arg3.  Curl-style, use @foo.txt to read from foo.txt\")\n-var timeout = getopt.IntLong(\"timeout\", 't', 30, \"Timeout (in seconds)\")\n+var peerAddr = flag.String(\"peer\", \"localhost:10500\", \"Host and port of remote peer\")\n+var serviceName = flag.String(\"service\", \"TestService\", \"Name of service to invoke\")\n+var operationName = flag.String(\"operation\", \"echo\", \"Name of operation to invoke\")\n+var arg2 = flag.String(\"arg2\", \"hello\", \"Input for arg2.  Curl-style, use @foo.txt to read from foo.txt\")\n+var arg3 = flag.String(\"arg3\", \"world\", \"Input for arg3.  Curl-style, use @foo.txt to read from foo.txt\")\n+var timeout = flag.Int(\"timeout\", 30, \"Timeout (in seconds)\")\n \n func asArgument(arg string) tchannel.Output {\n \tif arg[0] == '@' {\n \t\tf, err := os.Open(arg[1:])\n \t\tif err != nil {\n-\t\t\tpanic(err)\n+\t\t\tlog.Errorf(err.Error())\n+\t\t\tos.Exit(-1)","path":"golang/examples/hello/client/main.go","position":33,"original_position":33,"commit_id":"8f03586929258421753f61c504b5db23733c858e","original_commit_id":"8f03586929258421753f61c504b5db23733c858e","user":{"login":"abhinav","id":41730,"avatar_url":"https://avatars.githubusercontent.com/u/41730?v=3","gravatar_id":"","url":"https://api.github.com/users/abhinav","html_url":"https://github.com/abhinav","followers_url":"https://api.github.com/users/abhinav/followers","following_url":"https://api.github.com/users/abhinav/following{/other_user}","gists_url":"https://api.github.com/users/abhinav/gists{/gist_id}","starred_url":"https://api.github.com/users/abhinav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhinav/subscriptions","organizations_url":"https://api.github.com/users/abhinav/orgs","repos_url":"https://api.github.com/users/abhinav/repos","events_url":"https://api.github.com/users/abhinav/events{/privacy}","received_events_url":"https://api.github.com/users/abhinav/received_events","type":"User","site_admin":false},"body":"Ah, didn't realize this was using our logger","created_at":"2015-05-01T22:44:23Z","updated_at":"2015-05-01T22:44:23Z","html_url":"https://github.com/uber/tchannel/pull/509#discussion_r29539136","pull_request_url":"https://api.github.com/repos/uber/tchannel/pulls/509","_links":{"self":{"href":"https://api.github.com/repos/uber/tchannel/pulls/comments/29539136"},"html":{"href":"https://github.com/uber/tchannel/pull/509#discussion_r29539136"},"pull_request":{"href":"https://api.github.com/repos/uber/tchannel/pulls/509"}}},"pull_request":{"url":"https://api.github.com/repos/uber/tchannel/pulls/509","id":34572986,"html_url":"https://github.com/uber/tchannel/pull/509","diff_url":"https://github.com/uber/tchannel/pull/509.diff","patch_url":"https://github.com/uber/tchannel/pull/509.patch","issue_url":"https://api.github.com/repos/uber/tchannel/issues/509","number":509,"state":"open","locked":false,"title":"GoLang README and examples","user":{"login":"dacamp","id":2781009,"avatar_url":"https://avatars.githubusercontent.com/u/2781009?v=3","gravatar_id":"","url":"https://api.github.com/users/dacamp","html_url":"https://github.com/dacamp","followers_url":"https://api.github.com/users/dacamp/followers","following_url":"https://api.github.com/users/dacamp/following{/other_user}","gists_url":"https://api.github.com/users/dacamp/gists{/gist_id}","starred_url":"https://api.github.com/users/dacamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dacamp/subscriptions","organizations_url":"https://api.github.com/users/dacamp/orgs","repos_url":"https://api.github.com/users/dacamp/repos","events_url":"https://api.github.com/users/dacamp/events{/privacy}","received_events_url":"https://api.github.com/users/dacamp/received_events","type":"User","site_admin":false},"body":"Replaced getopt with STDLIB flag and removed dependency from Getdeps\r\n  Added default values to examples\r\n \r\nMove HelloWorld examples into hello directory\r\n\r\nCreated working PingPong example from README ","created_at":"2015-05-01T22:35:10Z","updated_at":"2015-05-01T22:44:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"79548d7d420b48681547300fe16a8f2eb56dcd52","assignee":{"login":"mmihic","id":392793,"avatar_url":"https://avatars.githubusercontent.com/u/392793?v=3","gravatar_id":"","url":"https://api.github.com/users/mmihic","html_url":"https://github.com/mmihic","followers_url":"https://api.github.com/users/mmihic/followers","following_url":"https://api.github.com/users/mmihic/following{/other_user}","gists_url":"https://api.github.com/users/mmihic/gists{/gist_id}","starred_url":"https://api.github.com/users/mmihic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmihic/subscriptions","organizations_url":"https://api.github.com/users/mmihic/orgs","repos_url":"https://api.github.com/users/mmihic/repos","events_url":"https://api.github.com/users/mmihic/events{/privacy}","received_events_url":"https://api.github.com/users/mmihic/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/uber/tchannel/pulls/509/commits","review_comments_url":"https://api.github.com/repos/uber/tchannel/pulls/509/comments","review_comment_url":"https://api.github.com/repos/uber/tchannel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uber/tchannel/issues/509/comments","statuses_url":"https://api.github.com/repos/uber/tchannel/statuses/8f03586929258421753f61c504b5db23733c858e","head":{"label":"uber:u/dcam/golang_examples","ref":"u/dcam/golang_examples","sha":"8f03586929258421753f61c504b5db23733c858e","user":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"repo":{"id":28419663,"name":"tchannel","full_name":"uber/tchannel","owner":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber/tchannel","description":"network multiplexing and framing protocol for RPC","fork":false,"url":"https://api.github.com/repos/uber/tchannel","forks_url":"https://api.github.com/repos/uber/tchannel/forks","keys_url":"https://api.github.com/repos/uber/tchannel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber/tchannel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber/tchannel/teams","hooks_url":"https://api.github.com/repos/uber/tchannel/hooks","issue_events_url":"https://api.github.com/repos/uber/tchannel/issues/events{/number}","events_url":"https://api.github.com/repos/uber/tchannel/events","assignees_url":"https://api.github.com/repos/uber/tchannel/assignees{/user}","branches_url":"https://api.github.com/repos/uber/tchannel/branches{/branch}","tags_url":"https://api.github.com/repos/uber/tchannel/tags","blobs_url":"https://api.github.com/repos/uber/tchannel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber/tchannel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber/tchannel/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber/tchannel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber/tchannel/statuses/{sha}","languages_url":"https://api.github.com/repos/uber/tchannel/languages","stargazers_url":"https://api.github.com/repos/uber/tchannel/stargazers","contributors_url":"https://api.github.com/repos/uber/tchannel/contributors","subscribers_url":"https://api.github.com/repos/uber/tchannel/subscribers","subscription_url":"https://api.github.com/repos/uber/tchannel/subscription","commits_url":"https://api.github.com/repos/uber/tchannel/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber/tchannel/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber/tchannel/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber/tchannel/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber/tchannel/contents/{+path}","compare_url":"https://api.github.com/repos/uber/tchannel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber/tchannel/merges","archive_url":"https://api.github.com/repos/uber/tchannel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber/tchannel/downloads","issues_url":"https://api.github.com/repos/uber/tchannel/issues{/number}","pulls_url":"https://api.github.com/repos/uber/tchannel/pulls{/number}","milestones_url":"https://api.github.com/repos/uber/tchannel/milestones{/number}","notifications_url":"https://api.github.com/repos/uber/tchannel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber/tchannel/labels{/name}","releases_url":"https://api.github.com/repos/uber/tchannel/releases{/id}","created_at":"2014-12-23T21:06:57Z","updated_at":"2015-05-01T19:03:48Z","pushed_at":"2015-05-01T22:44:06Z","git_url":"git://github.com/uber/tchannel.git","ssh_url":"git@github.com:uber/tchannel.git","clone_url":"https://github.com/uber/tchannel.git","svn_url":"https://github.com/uber/tchannel","homepage":"","size":15525,"stargazers_count":48,"watchers_count":48,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":63,"forks":3,"open_issues":63,"watchers":48,"default_branch":"master"}},"base":{"label":"uber:master","ref":"master","sha":"f003b0c79bdc7e94d538dd49b3875c004b95a5e4","user":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"repo":{"id":28419663,"name":"tchannel","full_name":"uber/tchannel","owner":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber/tchannel","description":"network multiplexing and framing protocol for RPC","fork":false,"url":"https://api.github.com/repos/uber/tchannel","forks_url":"https://api.github.com/repos/uber/tchannel/forks","keys_url":"https://api.github.com/repos/uber/tchannel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber/tchannel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber/tchannel/teams","hooks_url":"https://api.github.com/repos/uber/tchannel/hooks","issue_events_url":"https://api.github.com/repos/uber/tchannel/issues/events{/number}","events_url":"https://api.github.com/repos/uber/tchannel/events","assignees_url":"https://api.github.com/repos/uber/tchannel/assignees{/user}","branches_url":"https://api.github.com/repos/uber/tchannel/branches{/branch}","tags_url":"https://api.github.com/repos/uber/tchannel/tags","blobs_url":"https://api.github.com/repos/uber/tchannel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber/tchannel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber/tchannel/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber/tchannel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber/tchannel/statuses/{sha}","languages_url":"https://api.github.com/repos/uber/tchannel/languages","stargazers_url":"https://api.github.com/repos/uber/tchannel/stargazers","contributors_url":"https://api.github.com/repos/uber/tchannel/contributors","subscribers_url":"https://api.github.com/repos/uber/tchannel/subscribers","subscription_url":"https://api.github.com/repos/uber/tchannel/subscription","commits_url":"https://api.github.com/repos/uber/tchannel/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber/tchannel/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber/tchannel/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber/tchannel/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber/tchannel/contents/{+path}","compare_url":"https://api.github.com/repos/uber/tchannel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber/tchannel/merges","archive_url":"https://api.github.com/repos/uber/tchannel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber/tchannel/downloads","issues_url":"https://api.github.com/repos/uber/tchannel/issues{/number}","pulls_url":"https://api.github.com/repos/uber/tchannel/pulls{/number}","milestones_url":"https://api.github.com/repos/uber/tchannel/milestones{/number}","notifications_url":"https://api.github.com/repos/uber/tchannel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber/tchannel/labels{/name}","releases_url":"https://api.github.com/repos/uber/tchannel/releases{/id}","created_at":"2014-12-23T21:06:57Z","updated_at":"2015-05-01T19:03:48Z","pushed_at":"2015-05-01T22:44:06Z","git_url":"git://github.com/uber/tchannel.git","ssh_url":"git@github.com:uber/tchannel.git","clone_url":"https://github.com/uber/tchannel.git","svn_url":"https://github.com/uber/tchannel","homepage":"","size":15525,"stargazers_count":48,"watchers_count":48,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":63,"forks":3,"open_issues":63,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uber/tchannel/pulls/509"},"html":{"href":"https://github.com/uber/tchannel/pull/509"},"issue":{"href":"https://api.github.com/repos/uber/tchannel/issues/509"},"comments":{"href":"https://api.github.com/repos/uber/tchannel/issues/509/comments"},"review_comments":{"href":"https://api.github.com/repos/uber/tchannel/pulls/509/comments"},"review_comment":{"href":"https://api.github.com/repos/uber/tchannel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uber/tchannel/pulls/509/commits"},"statuses":{"href":"https://api.github.com/repos/uber/tchannel/statuses/8f03586929258421753f61c504b5db23733c858e"}}}}