{"action":"created","comment":{"url":"https://api.github.com/repos/containers/psgo/pulls/comments/205437353","pull_request_review_id":140705047,"id":205437353,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTQzNzM1Mw==","diff_hunk":"@@ -7,10 +7,10 @@ The idea behind the library is to provide an easy to use way of extracting proce\n \n This library aims to make things a bit more comfortable, especially for container runtimes, as the API allows to join the mount namespace of a given process and will parse `/proc` and `/dev/` from there. The API consists of the following functions:\n \n- - `psgo.ProcessInfo(format string) ([]string, error)`\n-   - ProcessInfo returns the process information of all processes in the current mount namespace. The input format must be a comma-separated list of supported AIX format descriptors.  If the input string is empty, the DefaultFormat is used. The return value is a slice of tab-separated strings, to easily use the output for column-based formatting (e.g., with the `text/tabwriter` package).\n+ - `psgo.ProcessInfo(descriptors []string) ([][]string, error)`\n+   - ProcessInfo returns the process information of all processes in the current mount namespace. The input descriptors must be a slice of supported AIX format descriptors in the normal form or in the code form, if supported.  If the input descriptor slice is empty, the `psgo.DefaultDescriptors` are used. The return value contains the string slice of process data, one per process.\n \n- - `psgo.JoinNamespaceAndProcessInfo(pid, format string) ([]string, error)`\n+ - `psgo.JoinNamespaceAndProcessInfo(pid string, descriptors []string) ([][]string, error)`","path":"README.md","position":10,"original_position":10,"commit_id":"55228b832a05f85c06198e4525cfcb2158a3082c","original_commit_id":"55228b832a05f85c06198e4525cfcb2158a3082c","user":{"login":"vrothberg","id":11679875,"node_id":"MDQ6VXNlcjExNjc5ODc1","avatar_url":"https://avatars1.githubusercontent.com/u/11679875?v=4","gravatar_id":"","url":"https://api.github.com/users/vrothberg","html_url":"https://github.com/vrothberg","followers_url":"https://api.github.com/users/vrothberg/followers","following_url":"https://api.github.com/users/vrothberg/following{/other_user}","gists_url":"https://api.github.com/users/vrothberg/gists{/gist_id}","starred_url":"https://api.github.com/users/vrothberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vrothberg/subscriptions","organizations_url":"https://api.github.com/users/vrothberg/orgs","repos_url":"https://api.github.com/users/vrothberg/repos","events_url":"https://api.github.com/users/vrothberg/events{/privacy}","received_events_url":"https://api.github.com/users/vrothberg/received_events","type":"User","site_admin":false},"body":"I see where the idea comes from, but that would make the printing  with `text/tabwriter` a bit too complicated for my taste. At the moment, we can just iterate over the slice and do `string.Join(.., \"\\t\")` for each \"row\". Having a `map[string]string` would require some additional work to do that (besides not preserving the order).\r\n\r\nFor client-side filters, I think it's acceptable and faster to lookup the index of a descriptor and use this index when iterating over the `[][]string`.","created_at":"2018-07-26T12:32:39Z","updated_at":"2018-07-26T12:32:39Z","html_url":"https://github.com/containers/psgo/pull/29#discussion_r205437353","pull_request_url":"https://api.github.com/repos/containers/psgo/pulls/29","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/containers/psgo/pulls/comments/205437353"},"html":{"href":"https://github.com/containers/psgo/pull/29#discussion_r205437353"},"pull_request":{"href":"https://api.github.com/repos/containers/psgo/pulls/29"}},"in_reply_to_id":205434234},"pull_request":{"url":"https://api.github.com/repos/containers/psgo/pulls/29","id":204092422,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0MDkyNDIy","html_url":"https://github.com/containers/psgo/pull/29","diff_url":"https://github.com/containers/psgo/pull/29.diff","patch_url":"https://github.com/containers/psgo/pull/29.patch","issue_url":"https://api.github.com/repos/containers/psgo/issues/29","number":29,"state":"open","locked":false,"title":"make API slice based","user":{"login":"vrothberg","id":11679875,"node_id":"MDQ6VXNlcjExNjc5ODc1","avatar_url":"https://avatars1.githubusercontent.com/u/11679875?v=4","gravatar_id":"","url":"https://api.github.com/users/vrothberg","html_url":"https://github.com/vrothberg","followers_url":"https://api.github.com/users/vrothberg/followers","following_url":"https://api.github.com/users/vrothberg/following{/other_user}","gists_url":"https://api.github.com/users/vrothberg/gists{/gist_id}","starred_url":"https://api.github.com/users/vrothberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vrothberg/subscriptions","organizations_url":"https://api.github.com/users/vrothberg/orgs","repos_url":"https://api.github.com/users/vrothberg/repos","events_url":"https://api.github.com/users/vrothberg/events{/privacy}","received_events_url":"https://api.github.com/users/vrothberg/received_events","type":"User","site_admin":false},"body":"Change the API arguments from `string` to `[]string` and the return\r\nvalues from `[]string` to `[][]string` to give users more control over\r\nthe data.  This way, users can, for instance, apply filters on the\r\nprocesses' data.\r\n\r\nSigned-off-by: Valentin Rothberg <vrothberg@suse.com>","created_at":"2018-07-26T10:10:31Z","updated_at":"2018-07-26T12:32:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a4773ddd922df8ac2130ece0018331fea1da3805","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/containers/psgo/pulls/29/commits","review_comments_url":"https://api.github.com/repos/containers/psgo/pulls/29/comments","review_comment_url":"https://api.github.com/repos/containers/psgo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/containers/psgo/issues/29/comments","statuses_url":"https://api.github.com/repos/containers/psgo/statuses/55228b832a05f85c06198e4525cfcb2158a3082c","head":{"label":"vrothberg:api-to-slice","ref":"api-to-slice","sha":"55228b832a05f85c06198e4525cfcb2158a3082c","user":{"login":"vrothberg","id":11679875,"node_id":"MDQ6VXNlcjExNjc5ODc1","avatar_url":"https://avatars1.githubusercontent.com/u/11679875?v=4","gravatar_id":"","url":"https://api.github.com/users/vrothberg","html_url":"https://github.com/vrothberg","followers_url":"https://api.github.com/users/vrothberg/followers","following_url":"https://api.github.com/users/vrothberg/following{/other_user}","gists_url":"https://api.github.com/users/vrothberg/gists{/gist_id}","starred_url":"https://api.github.com/users/vrothberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vrothberg/subscriptions","organizations_url":"https://api.github.com/users/vrothberg/orgs","repos_url":"https://api.github.com/users/vrothberg/repos","events_url":"https://api.github.com/users/vrothberg/events{/privacy}","received_events_url":"https://api.github.com/users/vrothberg/received_events","type":"User","site_admin":false},"repo":{"id":140821319,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA4MjEzMTk=","name":"psgo","full_name":"vrothberg/psgo","owner":{"login":"vrothberg","id":11679875,"node_id":"MDQ6VXNlcjExNjc5ODc1","avatar_url":"https://avatars1.githubusercontent.com/u/11679875?v=4","gravatar_id":"","url":"https://api.github.com/users/vrothberg","html_url":"https://github.com/vrothberg","followers_url":"https://api.github.com/users/vrothberg/followers","following_url":"https://api.github.com/users/vrothberg/following{/other_user}","gists_url":"https://api.github.com/users/vrothberg/gists{/gist_id}","starred_url":"https://api.github.com/users/vrothberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vrothberg/subscriptions","organizations_url":"https://api.github.com/users/vrothberg/orgs","repos_url":"https://api.github.com/users/vrothberg/repos","events_url":"https://api.github.com/users/vrothberg/events{/privacy}","received_events_url":"https://api.github.com/users/vrothberg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vrothberg/psgo","description":"A ps (1) AIX-format compatible golang library","fork":true,"url":"https://api.github.com/repos/vrothberg/psgo","forks_url":"https://api.github.com/repos/vrothberg/psgo/forks","keys_url":"https://api.github.com/repos/vrothberg/psgo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vrothberg/psgo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vrothberg/psgo/teams","hooks_url":"https://api.github.com/repos/vrothberg/psgo/hooks","issue_events_url":"https://api.github.com/repos/vrothberg/psgo/issues/events{/number}","events_url":"https://api.github.com/repos/vrothberg/psgo/events","assignees_url":"https://api.github.com/repos/vrothberg/psgo/assignees{/user}","branches_url":"https://api.github.com/repos/vrothberg/psgo/branches{/branch}","tags_url":"https://api.github.com/repos/vrothberg/psgo/tags","blobs_url":"https://api.github.com/repos/vrothberg/psgo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vrothberg/psgo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vrothberg/psgo/git/refs{/sha}","trees_url":"https://api.github.com/repos/vrothberg/psgo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vrothberg/psgo/statuses/{sha}","languages_url":"https://api.github.com/repos/vrothberg/psgo/languages","stargazers_url":"https://api.github.com/repos/vrothberg/psgo/stargazers","contributors_url":"https://api.github.com/repos/vrothberg/psgo/contributors","subscribers_url":"https://api.github.com/repos/vrothberg/psgo/subscribers","subscription_url":"https://api.github.com/repos/vrothberg/psgo/subscription","commits_url":"https://api.github.com/repos/vrothberg/psgo/commits{/sha}","git_commits_url":"https://api.github.com/repos/vrothberg/psgo/git/commits{/sha}","comments_url":"https://api.github.com/repos/vrothberg/psgo/comments{/number}","issue_comment_url":"https://api.github.com/repos/vrothberg/psgo/issues/comments{/number}","contents_url":"https://api.github.com/repos/vrothberg/psgo/contents/{+path}","compare_url":"https://api.github.com/repos/vrothberg/psgo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vrothberg/psgo/merges","archive_url":"https://api.github.com/repos/vrothberg/psgo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vrothberg/psgo/downloads","issues_url":"https://api.github.com/repos/vrothberg/psgo/issues{/number}","pulls_url":"https://api.github.com/repos/vrothberg/psgo/pulls{/number}","milestones_url":"https://api.github.com/repos/vrothberg/psgo/milestones{/number}","notifications_url":"https://api.github.com/repos/vrothberg/psgo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vrothberg/psgo/labels{/name}","releases_url":"https://api.github.com/repos/vrothberg/psgo/releases{/id}","deployments_url":"https://api.github.com/repos/vrothberg/psgo/deployments","created_at":"2018-07-13T08:41:35Z","updated_at":"2018-07-13T08:41:37Z","pushed_at":"2018-07-26T12:00:04Z","git_url":"git://github.com/vrothberg/psgo.git","ssh_url":"git@github.com:vrothberg/psgo.git","clone_url":"https://github.com/vrothberg/psgo.git","svn_url":"https://github.com/vrothberg/psgo","homepage":"","size":1191,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"containers:master","ref":"master","sha":"d77c80afd77bdfb79557bc62be2cae9637b7d0a2","user":{"login":"containers","id":5874934,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU4NzQ5MzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5874934?v=4","gravatar_id":"","url":"https://api.github.com/users/containers","html_url":"https://github.com/containers","followers_url":"https://api.github.com/users/containers/followers","following_url":"https://api.github.com/users/containers/following{/other_user}","gists_url":"https://api.github.com/users/containers/gists{/gist_id}","starred_url":"https://api.github.com/users/containers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/containers/subscriptions","organizations_url":"https://api.github.com/users/containers/orgs","repos_url":"https://api.github.com/users/containers/repos","events_url":"https://api.github.com/users/containers/events{/privacy}","received_events_url":"https://api.github.com/users/containers/received_events","type":"Organization","site_admin":false},"repo":{"id":140729245,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA3MjkyNDU=","name":"psgo","full_name":"containers/psgo","owner":{"login":"containers","id":5874934,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU4NzQ5MzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5874934?v=4","gravatar_id":"","url":"https://api.github.com/users/containers","html_url":"https://github.com/containers","followers_url":"https://api.github.com/users/containers/followers","following_url":"https://api.github.com/users/containers/following{/other_user}","gists_url":"https://api.github.com/users/containers/gists{/gist_id}","starred_url":"https://api.github.com/users/containers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/containers/subscriptions","organizations_url":"https://api.github.com/users/containers/orgs","repos_url":"https://api.github.com/users/containers/repos","events_url":"https://api.github.com/users/containers/events{/privacy}","received_events_url":"https://api.github.com/users/containers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/containers/psgo","description":"A ps (1) AIX-format compatible golang library","fork":false,"url":"https://api.github.com/repos/containers/psgo","forks_url":"https://api.github.com/repos/containers/psgo/forks","keys_url":"https://api.github.com/repos/containers/psgo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/containers/psgo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/containers/psgo/teams","hooks_url":"https://api.github.com/repos/containers/psgo/hooks","issue_events_url":"https://api.github.com/repos/containers/psgo/issues/events{/number}","events_url":"https://api.github.com/repos/containers/psgo/events","assignees_url":"https://api.github.com/repos/containers/psgo/assignees{/user}","branches_url":"https://api.github.com/repos/containers/psgo/branches{/branch}","tags_url":"https://api.github.com/repos/containers/psgo/tags","blobs_url":"https://api.github.com/repos/containers/psgo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/containers/psgo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/containers/psgo/git/refs{/sha}","trees_url":"https://api.github.com/repos/containers/psgo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/containers/psgo/statuses/{sha}","languages_url":"https://api.github.com/repos/containers/psgo/languages","stargazers_url":"https://api.github.com/repos/containers/psgo/stargazers","contributors_url":"https://api.github.com/repos/containers/psgo/contributors","subscribers_url":"https://api.github.com/repos/containers/psgo/subscribers","subscription_url":"https://api.github.com/repos/containers/psgo/subscription","commits_url":"https://api.github.com/repos/containers/psgo/commits{/sha}","git_commits_url":"https://api.github.com/repos/containers/psgo/git/commits{/sha}","comments_url":"https://api.github.com/repos/containers/psgo/comments{/number}","issue_comment_url":"https://api.github.com/repos/containers/psgo/issues/comments{/number}","contents_url":"https://api.github.com/repos/containers/psgo/contents/{+path}","compare_url":"https://api.github.com/repos/containers/psgo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/containers/psgo/merges","archive_url":"https://api.github.com/repos/containers/psgo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/containers/psgo/downloads","issues_url":"https://api.github.com/repos/containers/psgo/issues{/number}","pulls_url":"https://api.github.com/repos/containers/psgo/pulls{/number}","milestones_url":"https://api.github.com/repos/containers/psgo/milestones{/number}","notifications_url":"https://api.github.com/repos/containers/psgo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/containers/psgo/labels{/name}","releases_url":"https://api.github.com/repos/containers/psgo/releases{/id}","deployments_url":"https://api.github.com/repos/containers/psgo/deployments","created_at":"2018-07-12T15:06:51Z","updated_at":"2018-07-26T08:26:47Z","pushed_at":"2018-07-26T12:00:06Z","git_url":"git://github.com/containers/psgo.git","ssh_url":"git@github.com:containers/psgo.git","clone_url":"https://github.com/containers/psgo.git","svn_url":"https://github.com/containers/psgo","homepage":"","size":1189,"stargazers_count":7,"watchers_count":7,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":3,"open_issues":3,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/containers/psgo/pulls/29"},"html":{"href":"https://github.com/containers/psgo/pull/29"},"issue":{"href":"https://api.github.com/repos/containers/psgo/issues/29"},"comments":{"href":"https://api.github.com/repos/containers/psgo/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/containers/psgo/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/containers/psgo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/containers/psgo/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/containers/psgo/statuses/55228b832a05f85c06198e4525cfcb2158a3082c"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"vrothberg"}}