{"action":"closed","number":21,"pull_request":{"url":"https://api.github.com/repos/tcnksm/gcli/pulls/21","id":40443711,"html_url":"https://github.com/tcnksm/gcli/pull/21","diff_url":"https://github.com/tcnksm/gcli/pull/21.diff","patch_url":"https://github.com/tcnksm/gcli/pull/21.patch","issue_url":"https://api.github.com/repos/tcnksm/gcli/issues/21","number":21,"state":"closed","locked":false,"title":"Use flag var","user":{"login":"tcnksm","id":1256183,"avatar_url":"https://avatars.githubusercontent.com/u/1256183?v=3","gravatar_id":"","url":"https://api.github.com/users/tcnksm","html_url":"https://github.com/tcnksm","followers_url":"https://api.github.com/users/tcnksm/followers","following_url":"https://api.github.com/users/tcnksm/following{/other_user}","gists_url":"https://api.github.com/users/tcnksm/gists{/gist_id}","starred_url":"https://api.github.com/users/tcnksm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcnksm/subscriptions","organizations_url":"https://api.github.com/users/tcnksm/orgs","repos_url":"https://api.github.com/users/tcnksm/repos","events_url":"https://api.github.com/users/tcnksm/events{/privacy}","received_events_url":"https://api.github.com/users/tcnksm/received_events","type":"User","site_admin":false},"body":"Use `flag.Var` (This is just my preference),\r\n\r\n```bash\r\n$ make build && ./bin/gcli new -F flag -f file:string -f worker:int -f debug:bool test\r\n```\r\n\r\nThis will generate, \r\n\r\n```go\r\nvar (\r\n         file   string\r\n         worker int\r\n         debug  bool\r\n)\r\n\r\nflags.StringVar(&file, \"file\", \"\", \"\")\r\nflags.IntVar(&worker, \"worker\", 0, \"\")\r\nflags.BoolVar(&debug, \"debug\", false, \"\")\r\n```","created_at":"2015-07-21T10:40:00Z","updated_at":"2015-07-21T10:40:31Z","closed_at":"2015-07-21T10:40:31Z","merged_at":"2015-07-21T10:40:31Z","merge_commit_sha":"8777706800b5e0aa5920e789f0f96ea8655e07f5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tcnksm/gcli/pulls/21/commits","review_comments_url":"https://api.github.com/repos/tcnksm/gcli/pulls/21/comments","review_comment_url":"https://api.github.com/repos/tcnksm/gcli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tcnksm/gcli/issues/21/comments","statuses_url":"https://api.github.com/repos/tcnksm/gcli/statuses/73ad97835a4a42d70f4d88de3cd2fc2974fae9de","head":{"label":"tcnksm:use-flag-var","ref":"use-flag-var","sha":"73ad97835a4a42d70f4d88de3cd2fc2974fae9de","user":{"login":"tcnksm","id":1256183,"avatar_url":"https://avatars.githubusercontent.com/u/1256183?v=3","gravatar_id":"","url":"https://api.github.com/users/tcnksm","html_url":"https://github.com/tcnksm","followers_url":"https://api.github.com/users/tcnksm/followers","following_url":"https://api.github.com/users/tcnksm/following{/other_user}","gists_url":"https://api.github.com/users/tcnksm/gists{/gist_id}","starred_url":"https://api.github.com/users/tcnksm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcnksm/subscriptions","organizations_url":"https://api.github.com/users/tcnksm/orgs","repos_url":"https://api.github.com/users/tcnksm/repos","events_url":"https://api.github.com/users/tcnksm/events{/privacy}","received_events_url":"https://api.github.com/users/tcnksm/received_events","type":"User","site_admin":false},"repo":{"id":20994449,"name":"gcli","full_name":"tcnksm/gcli","owner":{"login":"tcnksm","id":1256183,"avatar_url":"https://avatars.githubusercontent.com/u/1256183?v=3","gravatar_id":"","url":"https://api.github.com/users/tcnksm","html_url":"https://github.com/tcnksm","followers_url":"https://api.github.com/users/tcnksm/followers","following_url":"https://api.github.com/users/tcnksm/following{/other_user}","gists_url":"https://api.github.com/users/tcnksm/gists{/gist_id}","starred_url":"https://api.github.com/users/tcnksm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcnksm/subscriptions","organizations_url":"https://api.github.com/users/tcnksm/orgs","repos_url":"https://api.github.com/users/tcnksm/repos","events_url":"https://api.github.com/users/tcnksm/events{/privacy}","received_events_url":"https://api.github.com/users/tcnksm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tcnksm/gcli","description":"The easy way to build Golang command-line application.","fork":false,"url":"https://api.github.com/repos/tcnksm/gcli","forks_url":"https://api.github.com/repos/tcnksm/gcli/forks","keys_url":"https://api.github.com/repos/tcnksm/gcli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tcnksm/gcli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tcnksm/gcli/teams","hooks_url":"https://api.github.com/repos/tcnksm/gcli/hooks","issue_events_url":"https://api.github.com/repos/tcnksm/gcli/issues/events{/number}","events_url":"https://api.github.com/repos/tcnksm/gcli/events","assignees_url":"https://api.github.com/repos/tcnksm/gcli/assignees{/user}","branches_url":"https://api.github.com/repos/tcnksm/gcli/branches{/branch}","tags_url":"https://api.github.com/repos/tcnksm/gcli/tags","blobs_url":"https://api.github.com/repos/tcnksm/gcli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tcnksm/gcli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tcnksm/gcli/git/refs{/sha}","trees_url":"https://api.github.com/repos/tcnksm/gcli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tcnksm/gcli/statuses/{sha}","languages_url":"https://api.github.com/repos/tcnksm/gcli/languages","stargazers_url":"https://api.github.com/repos/tcnksm/gcli/stargazers","contributors_url":"https://api.github.com/repos/tcnksm/gcli/contributors","subscribers_url":"https://api.github.com/repos/tcnksm/gcli/subscribers","subscription_url":"https://api.github.com/repos/tcnksm/gcli/subscription","commits_url":"https://api.github.com/repos/tcnksm/gcli/commits{/sha}","git_commits_url":"https://api.github.com/repos/tcnksm/gcli/git/commits{/sha}","comments_url":"https://api.github.com/repos/tcnksm/gcli/comments{/number}","issue_comment_url":"https://api.github.com/repos/tcnksm/gcli/issues/comments{/number}","contents_url":"https://api.github.com/repos/tcnksm/gcli/contents/{+path}","compare_url":"https://api.github.com/repos/tcnksm/gcli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tcnksm/gcli/merges","archive_url":"https://api.github.com/repos/tcnksm/gcli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tcnksm/gcli/downloads","issues_url":"https://api.github.com/repos/tcnksm/gcli/issues{/number}","pulls_url":"https://api.github.com/repos/tcnksm/gcli/pulls{/number}","milestones_url":"https://api.github.com/repos/tcnksm/gcli/milestones{/number}","notifications_url":"https://api.github.com/repos/tcnksm/gcli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tcnksm/gcli/labels{/name}","releases_url":"https://api.github.com/repos/tcnksm/gcli/releases{/id}","created_at":"2014-06-19T09:10:15Z","updated_at":"2015-07-21T05:47:28Z","pushed_at":"2015-07-21T10:40:31Z","git_url":"git://github.com/tcnksm/gcli.git","ssh_url":"git@github.com:tcnksm/gcli.git","clone_url":"https://github.com/tcnksm/gcli.git","svn_url":"https://github.com/tcnksm/gcli","homepage":"","size":3046,"stargazers_count":289,"watchers_count":289,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":0,"forks":21,"open_issues":0,"watchers":289,"default_branch":"master"}},"base":{"label":"tcnksm:master","ref":"master","sha":"8ad8436dd9b07e6dbe1b97f3ec1118f161af1b9a","user":{"login":"tcnksm","id":1256183,"avatar_url":"https://avatars.githubusercontent.com/u/1256183?v=3","gravatar_id":"","url":"https://api.github.com/users/tcnksm","html_url":"https://github.com/tcnksm","followers_url":"https://api.github.com/users/tcnksm/followers","following_url":"https://api.github.com/users/tcnksm/following{/other_user}","gists_url":"https://api.github.com/users/tcnksm/gists{/gist_id}","starred_url":"https://api.github.com/users/tcnksm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcnksm/subscriptions","organizations_url":"https://api.github.com/users/tcnksm/orgs","repos_url":"https://api.github.com/users/tcnksm/repos","events_url":"https://api.github.com/users/tcnksm/events{/privacy}","received_events_url":"https://api.github.com/users/tcnksm/received_events","type":"User","site_admin":false},"repo":{"id":20994449,"name":"gcli","full_name":"tcnksm/gcli","owner":{"login":"tcnksm","id":1256183,"avatar_url":"https://avatars.githubusercontent.com/u/1256183?v=3","gravatar_id":"","url":"https://api.github.com/users/tcnksm","html_url":"https://github.com/tcnksm","followers_url":"https://api.github.com/users/tcnksm/followers","following_url":"https://api.github.com/users/tcnksm/following{/other_user}","gists_url":"https://api.github.com/users/tcnksm/gists{/gist_id}","starred_url":"https://api.github.com/users/tcnksm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcnksm/subscriptions","organizations_url":"https://api.github.com/users/tcnksm/orgs","repos_url":"https://api.github.com/users/tcnksm/repos","events_url":"https://api.github.com/users/tcnksm/events{/privacy}","received_events_url":"https://api.github.com/users/tcnksm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tcnksm/gcli","description":"The easy way to build Golang command-line application.","fork":false,"url":"https://api.github.com/repos/tcnksm/gcli","forks_url":"https://api.github.com/repos/tcnksm/gcli/forks","keys_url":"https://api.github.com/repos/tcnksm/gcli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tcnksm/gcli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tcnksm/gcli/teams","hooks_url":"https://api.github.com/repos/tcnksm/gcli/hooks","issue_events_url":"https://api.github.com/repos/tcnksm/gcli/issues/events{/number}","events_url":"https://api.github.com/repos/tcnksm/gcli/events","assignees_url":"https://api.github.com/repos/tcnksm/gcli/assignees{/user}","branches_url":"https://api.github.com/repos/tcnksm/gcli/branches{/branch}","tags_url":"https://api.github.com/repos/tcnksm/gcli/tags","blobs_url":"https://api.github.com/repos/tcnksm/gcli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tcnksm/gcli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tcnksm/gcli/git/refs{/sha}","trees_url":"https://api.github.com/repos/tcnksm/gcli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tcnksm/gcli/statuses/{sha}","languages_url":"https://api.github.com/repos/tcnksm/gcli/languages","stargazers_url":"https://api.github.com/repos/tcnksm/gcli/stargazers","contributors_url":"https://api.github.com/repos/tcnksm/gcli/contributors","subscribers_url":"https://api.github.com/repos/tcnksm/gcli/subscribers","subscription_url":"https://api.github.com/repos/tcnksm/gcli/subscription","commits_url":"https://api.github.com/repos/tcnksm/gcli/commits{/sha}","git_commits_url":"https://api.github.com/repos/tcnksm/gcli/git/commits{/sha}","comments_url":"https://api.github.com/repos/tcnksm/gcli/comments{/number}","issue_comment_url":"https://api.github.com/repos/tcnksm/gcli/issues/comments{/number}","contents_url":"https://api.github.com/repos/tcnksm/gcli/contents/{+path}","compare_url":"https://api.github.com/repos/tcnksm/gcli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tcnksm/gcli/merges","archive_url":"https://api.github.com/repos/tcnksm/gcli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tcnksm/gcli/downloads","issues_url":"https://api.github.com/repos/tcnksm/gcli/issues{/number}","pulls_url":"https://api.github.com/repos/tcnksm/gcli/pulls{/number}","milestones_url":"https://api.github.com/repos/tcnksm/gcli/milestones{/number}","notifications_url":"https://api.github.com/repos/tcnksm/gcli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tcnksm/gcli/labels{/name}","releases_url":"https://api.github.com/repos/tcnksm/gcli/releases{/id}","created_at":"2014-06-19T09:10:15Z","updated_at":"2015-07-21T05:47:28Z","pushed_at":"2015-07-21T10:40:31Z","git_url":"git://github.com/tcnksm/gcli.git","ssh_url":"git@github.com:tcnksm/gcli.git","clone_url":"https://github.com/tcnksm/gcli.git","svn_url":"https://github.com/tcnksm/gcli","homepage":"","size":3046,"stargazers_count":289,"watchers_count":289,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":0,"forks":21,"open_issues":0,"watchers":289,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tcnksm/gcli/pulls/21"},"html":{"href":"https://github.com/tcnksm/gcli/pull/21"},"issue":{"href":"https://api.github.com/repos/tcnksm/gcli/issues/21"},"comments":{"href":"https://api.github.com/repos/tcnksm/gcli/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/tcnksm/gcli/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/tcnksm/gcli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tcnksm/gcli/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/tcnksm/gcli/statuses/73ad97835a4a42d70f4d88de3cd2fc2974fae9de"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"tcnksm","id":1256183,"avatar_url":"https://avatars.githubusercontent.com/u/1256183?v=3","gravatar_id":"","url":"https://api.github.com/users/tcnksm","html_url":"https://github.com/tcnksm","followers_url":"https://api.github.com/users/tcnksm/followers","following_url":"https://api.github.com/users/tcnksm/following{/other_user}","gists_url":"https://api.github.com/users/tcnksm/gists{/gist_id}","starred_url":"https://api.github.com/users/tcnksm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcnksm/subscriptions","organizations_url":"https://api.github.com/users/tcnksm/orgs","repos_url":"https://api.github.com/users/tcnksm/repos","events_url":"https://api.github.com/users/tcnksm/events{/privacy}","received_events_url":"https://api.github.com/users/tcnksm/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":6,"additions":37,"deletions":26,"changed_files":8}}