{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/buck/pulls/comments/52691313","id":52691313,"diff_hunk":"@@ -35,14 +35,24 @@\n {call go_common.srcs_arg /}\n \n {call buck.arg}\n+  {param name: 'library' /}\n+  {param default: 'None' /}\n+  {param desc}\n+  Specify the library that this internal test is testing. This will copy the <code>srcs</code>,\n+  {sp} <code>package_name</code> and <code>deps</code> from the target specified so you don't have\n+  to duplicate them.\n+  {/param}\n+{/call}\n+\n+{call buck.arg}\n   {param name : 'package_name' /}\n   {param default : 'go.prefix + path relative to the buck root + \"_test\"' /}\n   {param desc}\n   Sets the full name of the test package being compiled. This defaults to the path from the buck\n   root with \"_test\" appended. (e.g. given a ./.buckconfig, a rule in ./a/b/BUCK defaults to package \"a/b_test\")\n \n-  <p>Note: in order to test packages internally (i.e. same package name), you will need to re-declare\n-  all the sources/dependencies on this test and set package_name appropriately.</p>\n+  <p>Note: if you want to test packages internally (i.e. same package name), use the <code>library</code>\n+  {sp} parameter instead of setting <code>package_name</code> to include the tested source files.</p>","path":"docs/rule/go_test.soy","position":23,"original_position":23,"commit_id":"03aad699164c1b037b8b171de3329d0eeb1101e4","original_commit_id":"03aad699164c1b037b8b171de3329d0eeb1101e4","user":{"login":"sdwilsh","id":656602,"avatar_url":"https://avatars.githubusercontent.com/u/656602?v=3","gravatar_id":"","url":"https://api.github.com/users/sdwilsh","html_url":"https://github.com/sdwilsh","followers_url":"https://api.github.com/users/sdwilsh/followers","following_url":"https://api.github.com/users/sdwilsh/following{/other_user}","gists_url":"https://api.github.com/users/sdwilsh/gists{/gist_id}","starred_url":"https://api.github.com/users/sdwilsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdwilsh/subscriptions","organizations_url":"https://api.github.com/users/sdwilsh/orgs","repos_url":"https://api.github.com/users/sdwilsh/repos","events_url":"https://api.github.com/users/sdwilsh/events{/privacy}","received_events_url":"https://api.github.com/users/sdwilsh/received_events","type":"User","site_admin":false},"body":"no need for the space after `{sp}`","created_at":"2016-02-12T00:34:40Z","updated_at":"2016-02-12T00:34:40Z","html_url":"https://github.com/facebook/buck/pull/650#discussion_r52691313","pull_request_url":"https://api.github.com/repos/facebook/buck/pulls/650","_links":{"self":{"href":"https://api.github.com/repos/facebook/buck/pulls/comments/52691313"},"html":{"href":"https://github.com/facebook/buck/pull/650#discussion_r52691313"},"pull_request":{"href":"https://api.github.com/repos/facebook/buck/pulls/650"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/buck/pulls/650","id":58685734,"html_url":"https://github.com/facebook/buck/pull/650","diff_url":"https://github.com/facebook/buck/pull/650.diff","patch_url":"https://github.com/facebook/buck/pull/650.patch","issue_url":"https://api.github.com/repos/facebook/buck/issues/650","number":650,"state":"open","locked":false,"title":"Add `library` to go_test that copies the srcs/package/deps of the library it's testing.","user":{"login":"mikekap","id":43191,"avatar_url":"https://avatars.githubusercontent.com/u/43191?v=3","gravatar_id":"","url":"https://api.github.com/users/mikekap","html_url":"https://github.com/mikekap","followers_url":"https://api.github.com/users/mikekap/followers","following_url":"https://api.github.com/users/mikekap/following{/other_user}","gists_url":"https://api.github.com/users/mikekap/gists{/gist_id}","starred_url":"https://api.github.com/users/mikekap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikekap/subscriptions","organizations_url":"https://api.github.com/users/mikekap/orgs","repos_url":"https://api.github.com/users/mikekap/repos","events_url":"https://api.github.com/users/mikekap/events{/privacy}","received_events_url":"https://api.github.com/users/mikekap/received_events","type":"User","site_admin":false},"body":"This saves the trouble of duplicating the srcs/deps on the test target if you're testing the same package.","created_at":"2016-02-08T23:47:43Z","updated_at":"2016-02-12T00:34:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eadbb51bbba38001609db32509f14f253fffa45d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/buck/pulls/650/commits","review_comments_url":"https://api.github.com/repos/facebook/buck/pulls/650/comments","review_comment_url":"https://api.github.com/repos/facebook/buck/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/buck/issues/650/comments","statuses_url":"https://api.github.com/repos/facebook/buck/statuses/03aad699164c1b037b8b171de3329d0eeb1101e4","head":{"label":"mikekap:gotest","ref":"gotest","sha":"03aad699164c1b037b8b171de3329d0eeb1101e4","user":{"login":"mikekap","id":43191,"avatar_url":"https://avatars.githubusercontent.com/u/43191?v=3","gravatar_id":"","url":"https://api.github.com/users/mikekap","html_url":"https://github.com/mikekap","followers_url":"https://api.github.com/users/mikekap/followers","following_url":"https://api.github.com/users/mikekap/following{/other_user}","gists_url":"https://api.github.com/users/mikekap/gists{/gist_id}","starred_url":"https://api.github.com/users/mikekap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikekap/subscriptions","organizations_url":"https://api.github.com/users/mikekap/orgs","repos_url":"https://api.github.com/users/mikekap/repos","events_url":"https://api.github.com/users/mikekap/events{/privacy}","received_events_url":"https://api.github.com/users/mikekap/received_events","type":"User","site_admin":false},"repo":{"id":31528386,"name":"buck","full_name":"mikekap/buck","owner":{"login":"mikekap","id":43191,"avatar_url":"https://avatars.githubusercontent.com/u/43191?v=3","gravatar_id":"","url":"https://api.github.com/users/mikekap","html_url":"https://github.com/mikekap","followers_url":"https://api.github.com/users/mikekap/followers","following_url":"https://api.github.com/users/mikekap/following{/other_user}","gists_url":"https://api.github.com/users/mikekap/gists{/gist_id}","starred_url":"https://api.github.com/users/mikekap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikekap/subscriptions","organizations_url":"https://api.github.com/users/mikekap/orgs","repos_url":"https://api.github.com/users/mikekap/repos","events_url":"https://api.github.com/users/mikekap/events{/privacy}","received_events_url":"https://api.github.com/users/mikekap/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mikekap/buck","description":"A build system that encourages the creation of small, reusable modules.","fork":true,"url":"https://api.github.com/repos/mikekap/buck","forks_url":"https://api.github.com/repos/mikekap/buck/forks","keys_url":"https://api.github.com/repos/mikekap/buck/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mikekap/buck/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mikekap/buck/teams","hooks_url":"https://api.github.com/repos/mikekap/buck/hooks","issue_events_url":"https://api.github.com/repos/mikekap/buck/issues/events{/number}","events_url":"https://api.github.com/repos/mikekap/buck/events","assignees_url":"https://api.github.com/repos/mikekap/buck/assignees{/user}","branches_url":"https://api.github.com/repos/mikekap/buck/branches{/branch}","tags_url":"https://api.github.com/repos/mikekap/buck/tags","blobs_url":"https://api.github.com/repos/mikekap/buck/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mikekap/buck/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mikekap/buck/git/refs{/sha}","trees_url":"https://api.github.com/repos/mikekap/buck/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mikekap/buck/statuses/{sha}","languages_url":"https://api.github.com/repos/mikekap/buck/languages","stargazers_url":"https://api.github.com/repos/mikekap/buck/stargazers","contributors_url":"https://api.github.com/repos/mikekap/buck/contributors","subscribers_url":"https://api.github.com/repos/mikekap/buck/subscribers","subscription_url":"https://api.github.com/repos/mikekap/buck/subscription","commits_url":"https://api.github.com/repos/mikekap/buck/commits{/sha}","git_commits_url":"https://api.github.com/repos/mikekap/buck/git/commits{/sha}","comments_url":"https://api.github.com/repos/mikekap/buck/comments{/number}","issue_comment_url":"https://api.github.com/repos/mikekap/buck/issues/comments{/number}","contents_url":"https://api.github.com/repos/mikekap/buck/contents/{+path}","compare_url":"https://api.github.com/repos/mikekap/buck/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mikekap/buck/merges","archive_url":"https://api.github.com/repos/mikekap/buck/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mikekap/buck/downloads","issues_url":"https://api.github.com/repos/mikekap/buck/issues{/number}","pulls_url":"https://api.github.com/repos/mikekap/buck/pulls{/number}","milestones_url":"https://api.github.com/repos/mikekap/buck/milestones{/number}","notifications_url":"https://api.github.com/repos/mikekap/buck/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mikekap/buck/labels{/name}","releases_url":"https://api.github.com/repos/mikekap/buck/releases{/id}","deployments_url":"https://api.github.com/repos/mikekap/buck/deployments","created_at":"2015-03-02T07:29:32Z","updated_at":"2016-01-13T04:12:40Z","pushed_at":"2016-02-09T20:12:56Z","git_url":"git://github.com/mikekap/buck.git","ssh_url":"git@github.com:mikekap/buck.git","clone_url":"https://github.com/mikekap/buck.git","svn_url":"https://github.com/mikekap/buck","homepage":"http://facebook.github.io/buck/","size":337993,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"4ff73c8a24b6400319e76afbd99f6b7f8ce88cec","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":9504214,"name":"buck","full_name":"facebook/buck","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/buck","description":"A fast build system that encourages the creation of small, reusable modules over a variety of platforms and languages.","fork":false,"url":"https://api.github.com/repos/facebook/buck","forks_url":"https://api.github.com/repos/facebook/buck/forks","keys_url":"https://api.github.com/repos/facebook/buck/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/buck/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/buck/teams","hooks_url":"https://api.github.com/repos/facebook/buck/hooks","issue_events_url":"https://api.github.com/repos/facebook/buck/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/buck/events","assignees_url":"https://api.github.com/repos/facebook/buck/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/buck/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/buck/tags","blobs_url":"https://api.github.com/repos/facebook/buck/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/buck/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/buck/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/buck/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/buck/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/buck/languages","stargazers_url":"https://api.github.com/repos/facebook/buck/stargazers","contributors_url":"https://api.github.com/repos/facebook/buck/contributors","subscribers_url":"https://api.github.com/repos/facebook/buck/subscribers","subscription_url":"https://api.github.com/repos/facebook/buck/subscription","commits_url":"https://api.github.com/repos/facebook/buck/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/buck/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/buck/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/buck/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/buck/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/buck/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/buck/merges","archive_url":"https://api.github.com/repos/facebook/buck/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/buck/downloads","issues_url":"https://api.github.com/repos/facebook/buck/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/buck/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/buck/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/buck/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/buck/labels{/name}","releases_url":"https://api.github.com/repos/facebook/buck/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/buck/deployments","created_at":"2013-04-17T18:12:18Z","updated_at":"2016-02-11T14:20:33Z","pushed_at":"2016-02-11T21:15:20Z","git_url":"git://github.com/facebook/buck.git","ssh_url":"git@github.com:facebook/buck.git","clone_url":"https://github.com/facebook/buck.git","svn_url":"https://github.com/facebook/buck","homepage":"https://buckbuild.com","size":374794,"stargazers_count":2322,"watchers_count":2322,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":394,"mirror_url":null,"open_issues_count":103,"forks":394,"open_issues":103,"watchers":2322,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/buck/pulls/650"},"html":{"href":"https://github.com/facebook/buck/pull/650"},"issue":{"href":"https://api.github.com/repos/facebook/buck/issues/650"},"comments":{"href":"https://api.github.com/repos/facebook/buck/issues/650/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/buck/pulls/650/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/buck/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/buck/pulls/650/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/buck/statuses/03aad699164c1b037b8b171de3329d0eeb1101e4"}}}}