GitHub PullRequestReviewCommentEvent at 2014-09-05 20:04:27
Repository: kubernetes
Actor: thockin
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/17194368","id":17194368,"diff_hunk":"@@ -0,0 +1,158 @@\n+/*\n+Copyright 2014 Google Inc. All rights reserved.\n+\n+Licensed under the Apache License, Version 2.0 (the \"License\");\n+you may not use this file except in compliance with the License.\n+You may obtain a copy of the License at\n+\n+    http://www.apache.org/licenses/LICENSE-2.0\n+\n+Unless required by applicable law or agreed to in writing, software\n+distributed under the License is distributed on an \"AS IS\" BASIS,\n+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+See the License for the specific language governing permissions and\n+limitations under the License.\n+*/\n+\n+package util\n+\n+import (\n+\t\"fmt\"\n+)\n+\n+// SISuffix is a string representing a 2^(x * 10) exponent.\n+type SISuffix string\n+\n+var ExponentFromSI = map[SISuffix]int{}\n+var SIFromExponent = map[int]SISuffix{}\n+\n+func addSIExponent(si SISuffix, exponent int) {\n+\tExponentFromSI[si] = exponent\n+\tSIFromExponent[exponent] = si\n+}\n+\n+func init() {\n+\taddSIExponent(\"mi\", -10)\n+\taddSIExponent(\"\", 0)\n+\taddSIExponent(\"Ki\", 10)\n+\taddSIExponent(\"Mi\", 20)\n+\taddSIExponent(\"Gi\", 30)\n+\taddSIExponent(\"Ti\", 40)\n+\taddSIExponent(\"Pi\", 50)\n+\taddSIExponent(\"Xi\", 60)\n+}\n+\n+// Numeric is a fixed-point representation of a number.\n+// It provides convenient marshaling/unmarshaling in JSON and YAML,\n+// in addition to String() and Int64() accessors.\n+// The serialization format is:\n+//\n+// <serialized>      ::= <sign><numeric> | <numeric>\n+// <numeric>         ::= <digits><exponent> | <digits>.<digits><exponent>\n+// <sign>            ::= \"+\" | \"-\"\n+// <digits>          ::= 0 | 1 | ... | 9\n+// <exponent>        ::= <binaryExponent> | <decimalExponent>\n+// <decimalExponent> ::= \"e\" <digits>","path":"pkg/util/numeric.go","position":55,"original_position":55,"commit_id":"7d2334945eae43e73c9683f3e8b8c8ff2c434169","original_commit_id":"7d2334945eae43e73c9683f3e8b8c8ff2c434169","user":{"login":"thockin","id":5595220,"avatar_url":"https://avatars.githubusercontent.com/u/5595220?v=2","gravatar_id":"6ae5ac8e0b7147021a4eaa2b9535f58d","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/received_events","type":"User","site_admin":false},"body":"I thought we agreed to not have E?  John?  It's not a huge deal if we accept float-style values everywhere, I guess.","created_at":"2014-09-05T20:04:27Z","updated_at":"2014-09-05T20:04:27Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/1185#discussion_r17194368","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1185","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/17194368"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/1185#discussion_r17194368"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1185"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1185","id":20780725,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/1185","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/1185.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/1185.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/1185","number":1185,"state":"open","locked":false,"title":"WIP: Start numeric type for resources","user":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=2","gravatar_id":"1a843544abcf9f764d28e3427a4a9610","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"body":"Opening for comments on this approach. Not functional yet.","created_at":"2014-09-04T23:52:09Z","updated_at":"2014-09-05T20:04:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e2187af7be3b13d69377c238c940220cb53fe306","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1185/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1185/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/{number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/1185/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/7d2334945eae43e73c9683f3e8b8c8ff2c434169","head":{"label":"lavalamp:numeric","ref":"numeric","sha":"7d2334945eae43e73c9683f3e8b8c8ff2c434169","user":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=2","gravatar_id":"1a843544abcf9f764d28e3427a4a9610","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"repo":{"id":20749157,"name":"kubernetes","full_name":"lavalamp/kubernetes","owner":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=2","gravatar_id":"1a843544abcf9f764d28e3427a4a9610","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lavalamp/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/lavalamp/kubernetes","forks_url":"https://api.github.com/repos/lavalamp/kubernetes/forks","keys_url":"https://api.github.com/repos/lavalamp/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lavalamp/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lavalamp/kubernetes/teams","hooks_url":"https://api.github.com/repos/lavalamp/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/lavalamp/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/lavalamp/kubernetes/events","assignees_url":"https://api.github.com/repos/lavalamp/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/lavalamp/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/lavalamp/kubernetes/tags","blobs_url":"https://api.github.com/repos/lavalamp/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lavalamp/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lavalamp/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/lavalamp/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lavalamp/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/lavalamp/kubernetes/languages","stargazers_url":"https://api.github.com/repos/lavalamp/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/lavalamp/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/lavalamp/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/lavalamp/kubernetes/subscription","commits_url":"https://api.github.com/repos/lavalamp/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/lavalamp/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/lavalamp/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/lavalamp/kubernetes/issues/comments/{number}","contents_url":"https://api.github.com/repos/lavalamp/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/lavalamp/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lavalamp/kubernetes/merges","archive_url":"https://api.github.com/repos/lavalamp/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lavalamp/kubernetes/downloads","issues_url":"https://api.github.com/repos/lavalamp/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/lavalamp/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/lavalamp/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/lavalamp/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lavalamp/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/lavalamp/kubernetes/releases{/id}","created_at":"2014-06-12T00:36:13Z","updated_at":"2014-07-15T22:39:06Z","pushed_at":"2014-09-05T00:48:27Z","git_url":"git://github.com/lavalamp/kubernetes.git","ssh_url":"git@github.com:lavalamp/kubernetes.git","clone_url":"https://github.com/lavalamp/kubernetes.git","svn_url":"https://github.com/lavalamp/kubernetes","homepage":null,"size":11750,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"ccfdf140976b57d0513013a1483a418cf4b185e0","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=2","gravatar_id":"3db02c6238c8b1fb844871330744ec5d","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"GoogleCloudPlatform/kubernetes","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=2","gravatar_id":"3db02c6238c8b1fb844871330744ec5d","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes","description":"Container Cluster Manager","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments/{number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2014-09-05T20:03:33Z","pushed_at":"2014-09-05T17:07:58Z","git_url":"git://github.com/GoogleCloudPlatform/kubernetes.git","ssh_url":"git@github.com:GoogleCloudPlatform/kubernetes.git","clone_url":"https://github.com/GoogleCloudPlatform/kubernetes.git","svn_url":"https://github.com/GoogleCloudPlatform/kubernetes","homepage":null,"size":26982,"stargazers_count":3423,"watchers_count":3423,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":454,"mirror_url":null,"open_issues_count":183,"forks":454,"open_issues":183,"watchers":3423,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1185"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/1185"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/1185"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/1185/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1185/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1185/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/7d2334945eae43e73c9683f3e8b8c8ff2c434169"}}}}