{"action":"created","comment":{"url":"https://api.github.com/repos/opencontainers/ocitools/pulls/comments/77943280","id":77943280,"diff_hunk":"@@ -0,0 +1,574 @@\n+package validate\n+\n+import (\n+\t\"bufio\"\n+\t\"fmt\"\n+\t\"os\"\n+\t\"path\"\n+\t\"path/filepath\"\n+\t\"reflect\"\n+\t\"strings\"\n+\t\"unicode\"\n+\n+\t\"github.com/Sirupsen/logrus\"\n+\t\"github.com/blang/semver\"\n+\trspec \"github.com/opencontainers/runtime-spec/specs-go\"\n+)\n+\n+var (\n+\tdefaultRlimits = []string{\n+\t\t\"RLIMIT_CPU\",\n+\t\t\"RLIMIT_FSIZE\",\n+\t\t\"RLIMIT_DATA\",\n+\t\t\"RLIMIT_STACK\",\n+\t\t\"RLIMIT_CORE\",\n+\t\t\"RLIMIT_RSS\",\n+\t\t\"RLIMIT_NPROC\",\n+\t\t\"RLIMIT_NOFILE\",\n+\t\t\"RLIMIT_MEMLOCK\",\n+\t\t\"RLIMIT_AS\",\n+\t\t\"RLIMIT_LOCKS\",\n+\t\t\"RLIMIT_SIGPENDING\",\n+\t\t\"RLIMIT_MSGQUEUE\",\n+\t\t\"RLIMIT_NICE\",\n+\t\t\"RLIMIT_RTPRIO\",\n+\t\t\"RLIMIT_RTTIME\",\n+\t}\n+\tdefaultCaps = []string{\n+\t\t\"CAP_CHOWN\",\n+\t\t\"CAP_DAC_OVERRIDE\",\n+\t\t\"CAP_FSETID\",\n+\t\t\"CAP_FOWNER\",\n+\t\t\"CAP_MKNOD\",\n+\t\t\"CAP_NET_RAW\",\n+\t\t\"CAP_SETGID\",\n+\t\t\"CAP_SETUID\",\n+\t\t\"CAP_SETFCAP\",\n+\t\t\"CAP_SETPCAP\",\n+\t\t\"CAP_NET_BIND_SERVICE\",\n+\t\t\"CAP_SYS_CHROOT\",\n+\t\t\"CAP_KILL\",\n+\t\t\"CAP_AUDIT_WRITE\",\n+\t}\n+)\n+\n+type Validator struct {\n+\tspec         rspec.Spec","path":"validate/validate.go","position":56,"original_position":56,"commit_id":"79cc4ba5cf69770fd5189ef95cecd4cf47c48e70","original_commit_id":"79cc4ba5cf69770fd5189ef95cecd4cf47c48e70","user":{"login":"wking","id":209920,"avatar_url":"https://avatars.githubusercontent.com/u/209920?v=3","gravatar_id":"","url":"https://api.github.com/users/wking","html_url":"https://github.com/wking","followers_url":"https://api.github.com/users/wking/followers","following_url":"https://api.github.com/users/wking/following{/other_user}","gists_url":"https://api.github.com/users/wking/gists{/gist_id}","starred_url":"https://api.github.com/users/wking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wking/subscriptions","organizations_url":"https://api.github.com/users/wking/orgs","repos_url":"https://api.github.com/users/wking/repos","events_url":"https://api.github.com/users/wking/events{/privacy}","received_events_url":"https://api.github.com/users/wking/received_events","type":"User","site_admin":false},"body":"I think we want to use a pointer here to match `Generator.spec` (which I think should be [public][1] too ;).\r\n\r\n[1]: https://github.com/opencontainers/ocitools/pull/188/files#r77942243","created_at":"2016-09-08T04:07:58Z","updated_at":"2016-09-08T04:07:58Z","html_url":"https://github.com/opencontainers/ocitools/pull/188#discussion_r77943280","pull_request_url":"https://api.github.com/repos/opencontainers/ocitools/pulls/188","_links":{"self":{"href":"https://api.github.com/repos/opencontainers/ocitools/pulls/comments/77943280"},"html":{"href":"https://github.com/opencontainers/ocitools/pull/188#discussion_r77943280"},"pull_request":{"href":"https://api.github.com/repos/opencontainers/ocitools/pulls/188"}}},"pull_request":{"url":"https://api.github.com/repos/opencontainers/ocitools/pulls/188","id":80602678,"html_url":"https://github.com/opencontainers/ocitools/pull/188","diff_url":"https://github.com/opencontainers/ocitools/pull/188.diff","patch_url":"https://github.com/opencontainers/ocitools/pull/188.patch","issue_url":"https://api.github.com/repos/opencontainers/ocitools/issues/188","number":188,"state":"open","locked":false,"title":"add validate_test.go to do unit test","user":{"login":"liangchenye","id":13341875,"avatar_url":"https://avatars.githubusercontent.com/u/13341875?v=3","gravatar_id":"","url":"https://api.github.com/users/liangchenye","html_url":"https://github.com/liangchenye","followers_url":"https://api.github.com/users/liangchenye/followers","following_url":"https://api.github.com/users/liangchenye/following{/other_user}","gists_url":"https://api.github.com/users/liangchenye/gists{/gist_id}","starred_url":"https://api.github.com/users/liangchenye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liangchenye/subscriptions","organizations_url":"https://api.github.com/users/liangchenye/orgs","repos_url":"https://api.github.com/users/liangchenye/repos","events_url":"https://api.github.com/users/liangchenye/events{/privacy}","received_events_url":"https://api.github.com/users/liangchenye/received_events","type":"User","site_admin":false},"body":"Only add a test case on  checkSemVer in this PR.\r\nSigned-off-by: liang chenye <liangchenye@huawei.com>","created_at":"2016-08-09T11:17:39Z","updated_at":"2016-09-08T04:07:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"162aa470d650d36fef76d64b65aaa69372ab9b42","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/opencontainers/ocitools/pulls/188/commits","review_comments_url":"https://api.github.com/repos/opencontainers/ocitools/pulls/188/comments","review_comment_url":"https://api.github.com/repos/opencontainers/ocitools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opencontainers/ocitools/issues/188/comments","statuses_url":"https://api.github.com/repos/opencontainers/ocitools/statuses/79cc4ba5cf69770fd5189ef95cecd4cf47c48e70","head":{"label":"liangchenye:gotest","ref":"gotest","sha":"79cc4ba5cf69770fd5189ef95cecd4cf47c48e70","user":{"login":"liangchenye","id":13341875,"avatar_url":"https://avatars.githubusercontent.com/u/13341875?v=3","gravatar_id":"","url":"https://api.github.com/users/liangchenye","html_url":"https://github.com/liangchenye","followers_url":"https://api.github.com/users/liangchenye/followers","following_url":"https://api.github.com/users/liangchenye/following{/other_user}","gists_url":"https://api.github.com/users/liangchenye/gists{/gist_id}","starred_url":"https://api.github.com/users/liangchenye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liangchenye/subscriptions","organizations_url":"https://api.github.com/users/liangchenye/orgs","repos_url":"https://api.github.com/users/liangchenye/repos","events_url":"https://api.github.com/users/liangchenye/events{/privacy}","received_events_url":"https://api.github.com/users/liangchenye/received_events","type":"User","site_admin":false},"repo":{"id":56134403,"name":"ocitools","full_name":"liangchenye/ocitools","owner":{"login":"liangchenye","id":13341875,"avatar_url":"https://avatars.githubusercontent.com/u/13341875?v=3","gravatar_id":"","url":"https://api.github.com/users/liangchenye","html_url":"https://github.com/liangchenye","followers_url":"https://api.github.com/users/liangchenye/followers","following_url":"https://api.github.com/users/liangchenye/following{/other_user}","gists_url":"https://api.github.com/users/liangchenye/gists{/gist_id}","starred_url":"https://api.github.com/users/liangchenye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liangchenye/subscriptions","organizations_url":"https://api.github.com/users/liangchenye/orgs","repos_url":"https://api.github.com/users/liangchenye/repos","events_url":"https://api.github.com/users/liangchenye/events{/privacy}","received_events_url":"https://api.github.com/users/liangchenye/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/liangchenye/ocitools","description":"OCI Testing Toolset","fork":true,"url":"https://api.github.com/repos/liangchenye/ocitools","forks_url":"https://api.github.com/repos/liangchenye/ocitools/forks","keys_url":"https://api.github.com/repos/liangchenye/ocitools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/liangchenye/ocitools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/liangchenye/ocitools/teams","hooks_url":"https://api.github.com/repos/liangchenye/ocitools/hooks","issue_events_url":"https://api.github.com/repos/liangchenye/ocitools/issues/events{/number}","events_url":"https://api.github.com/repos/liangchenye/ocitools/events","assignees_url":"https://api.github.com/repos/liangchenye/ocitools/assignees{/user}","branches_url":"https://api.github.com/repos/liangchenye/ocitools/branches{/branch}","tags_url":"https://api.github.com/repos/liangchenye/ocitools/tags","blobs_url":"https://api.github.com/repos/liangchenye/ocitools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/liangchenye/ocitools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/liangchenye/ocitools/git/refs{/sha}","trees_url":"https://api.github.com/repos/liangchenye/ocitools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/liangchenye/ocitools/statuses/{sha}","languages_url":"https://api.github.com/repos/liangchenye/ocitools/languages","stargazers_url":"https://api.github.com/repos/liangchenye/ocitools/stargazers","contributors_url":"https://api.github.com/repos/liangchenye/ocitools/contributors","subscribers_url":"https://api.github.com/repos/liangchenye/ocitools/subscribers","subscription_url":"https://api.github.com/repos/liangchenye/ocitools/subscription","commits_url":"https://api.github.com/repos/liangchenye/ocitools/commits{/sha}","git_commits_url":"https://api.github.com/repos/liangchenye/ocitools/git/commits{/sha}","comments_url":"https://api.github.com/repos/liangchenye/ocitools/comments{/number}","issue_comment_url":"https://api.github.com/repos/liangchenye/ocitools/issues/comments{/number}","contents_url":"https://api.github.com/repos/liangchenye/ocitools/contents/{+path}","compare_url":"https://api.github.com/repos/liangchenye/ocitools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/liangchenye/ocitools/merges","archive_url":"https://api.github.com/repos/liangchenye/ocitools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/liangchenye/ocitools/downloads","issues_url":"https://api.github.com/repos/liangchenye/ocitools/issues{/number}","pulls_url":"https://api.github.com/repos/liangchenye/ocitools/pulls{/number}","milestones_url":"https://api.github.com/repos/liangchenye/ocitools/milestones{/number}","notifications_url":"https://api.github.com/repos/liangchenye/ocitools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/liangchenye/ocitools/labels{/name}","releases_url":"https://api.github.com/repos/liangchenye/ocitools/releases{/id}","deployments_url":"https://api.github.com/repos/liangchenye/ocitools/deployments","created_at":"2016-04-13T08:27:12Z","updated_at":"2016-04-13T08:27:12Z","pushed_at":"2016-09-08T03:35:37Z","git_url":"git://github.com/liangchenye/ocitools.git","ssh_url":"git@github.com:liangchenye/ocitools.git","clone_url":"https://github.com/liangchenye/ocitools.git","svn_url":"https://github.com/liangchenye/ocitools","homepage":null,"size":2824,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"opencontainers:master","ref":"master","sha":"089d97140a68ed65b9374a2dc66ed69b260903a2","user":{"login":"opencontainers","id":12563465,"avatar_url":"https://avatars.githubusercontent.com/u/12563465?v=3","gravatar_id":"","url":"https://api.github.com/users/opencontainers","html_url":"https://github.com/opencontainers","followers_url":"https://api.github.com/users/opencontainers/followers","following_url":"https://api.github.com/users/opencontainers/following{/other_user}","gists_url":"https://api.github.com/users/opencontainers/gists{/gist_id}","starred_url":"https://api.github.com/users/opencontainers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencontainers/subscriptions","organizations_url":"https://api.github.com/users/opencontainers/orgs","repos_url":"https://api.github.com/users/opencontainers/repos","events_url":"https://api.github.com/users/opencontainers/events{/privacy}","received_events_url":"https://api.github.com/users/opencontainers/received_events","type":"Organization","site_admin":false},"repo":{"id":49598840,"name":"ocitools","full_name":"opencontainers/ocitools","owner":{"login":"opencontainers","id":12563465,"avatar_url":"https://avatars.githubusercontent.com/u/12563465?v=3","gravatar_id":"","url":"https://api.github.com/users/opencontainers","html_url":"https://github.com/opencontainers","followers_url":"https://api.github.com/users/opencontainers/followers","following_url":"https://api.github.com/users/opencontainers/following{/other_user}","gists_url":"https://api.github.com/users/opencontainers/gists{/gist_id}","starred_url":"https://api.github.com/users/opencontainers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencontainers/subscriptions","organizations_url":"https://api.github.com/users/opencontainers/orgs","repos_url":"https://api.github.com/users/opencontainers/repos","events_url":"https://api.github.com/users/opencontainers/events{/privacy}","received_events_url":"https://api.github.com/users/opencontainers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opencontainers/ocitools","description":"OCI runtime tools","fork":false,"url":"https://api.github.com/repos/opencontainers/ocitools","forks_url":"https://api.github.com/repos/opencontainers/ocitools/forks","keys_url":"https://api.github.com/repos/opencontainers/ocitools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opencontainers/ocitools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opencontainers/ocitools/teams","hooks_url":"https://api.github.com/repos/opencontainers/ocitools/hooks","issue_events_url":"https://api.github.com/repos/opencontainers/ocitools/issues/events{/number}","events_url":"https://api.github.com/repos/opencontainers/ocitools/events","assignees_url":"https://api.github.com/repos/opencontainers/ocitools/assignees{/user}","branches_url":"https://api.github.com/repos/opencontainers/ocitools/branches{/branch}","tags_url":"https://api.github.com/repos/opencontainers/ocitools/tags","blobs_url":"https://api.github.com/repos/opencontainers/ocitools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opencontainers/ocitools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opencontainers/ocitools/git/refs{/sha}","trees_url":"https://api.github.com/repos/opencontainers/ocitools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opencontainers/ocitools/statuses/{sha}","languages_url":"https://api.github.com/repos/opencontainers/ocitools/languages","stargazers_url":"https://api.github.com/repos/opencontainers/ocitools/stargazers","contributors_url":"https://api.github.com/repos/opencontainers/ocitools/contributors","subscribers_url":"https://api.github.com/repos/opencontainers/ocitools/subscribers","subscription_url":"https://api.github.com/repos/opencontainers/ocitools/subscription","commits_url":"https://api.github.com/repos/opencontainers/ocitools/commits{/sha}","git_commits_url":"https://api.github.com/repos/opencontainers/ocitools/git/commits{/sha}","comments_url":"https://api.github.com/repos/opencontainers/ocitools/comments{/number}","issue_comment_url":"https://api.github.com/repos/opencontainers/ocitools/issues/comments{/number}","contents_url":"https://api.github.com/repos/opencontainers/ocitools/contents/{+path}","compare_url":"https://api.github.com/repos/opencontainers/ocitools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opencontainers/ocitools/merges","archive_url":"https://api.github.com/repos/opencontainers/ocitools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opencontainers/ocitools/downloads","issues_url":"https://api.github.com/repos/opencontainers/ocitools/issues{/number}","pulls_url":"https://api.github.com/repos/opencontainers/ocitools/pulls{/number}","milestones_url":"https://api.github.com/repos/opencontainers/ocitools/milestones{/number}","notifications_url":"https://api.github.com/repos/opencontainers/ocitools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opencontainers/ocitools/labels{/name}","releases_url":"https://api.github.com/repos/opencontainers/ocitools/releases{/id}","deployments_url":"https://api.github.com/repos/opencontainers/ocitools/deployments","created_at":"2016-01-13T20:10:21Z","updated_at":"2016-09-07T01:11:49Z","pushed_at":"2016-09-08T03:35:38Z","git_url":"git://github.com/opencontainers/ocitools.git","ssh_url":"git@github.com:opencontainers/ocitools.git","clone_url":"https://github.com/opencontainers/ocitools.git","svn_url":"https://github.com/opencontainers/ocitools","homepage":"https://www.opencontainers.org/","size":3007,"stargazers_count":43,"watchers_count":43,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":36,"forks":24,"open_issues":36,"watchers":43,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opencontainers/ocitools/pulls/188"},"html":{"href":"https://github.com/opencontainers/ocitools/pull/188"},"issue":{"href":"https://api.github.com/repos/opencontainers/ocitools/issues/188"},"comments":{"href":"https://api.github.com/repos/opencontainers/ocitools/issues/188/comments"},"review_comments":{"href":"https://api.github.com/repos/opencontainers/ocitools/pulls/188/comments"},"review_comment":{"href":"https://api.github.com/repos/opencontainers/ocitools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opencontainers/ocitools/pulls/188/commits"},"statuses":{"href":"https://api.github.com/repos/opencontainers/ocitools/statuses/79cc4ba5cf69770fd5189ef95cecd4cf47c48e70"}}}}
{"actor":{"display_login":"wking"}}