{"action":"created","comment":{"url":"https://api.github.com/repos/dustin/go-humanize/pulls/comments/37153247","id":37153247,"diff_hunk":"@@ -25,11 +25,21 @@ func Time(then time.Time) string {\n \treturn RelTime(then, time.Now(), \"ago\", \"from now\")\n }\n \n-var magnitudes = []struct {\n+type Magnitude struct {\n \td      int64\n \tformat string\n \tdivby  int64\n-}{\n+}\n+\n+func NewMagitude(d int64, format string, divby int64) *Magnitude {","path":"times.go","position":12,"original_position":12,"commit_id":"69d01a4292cfe2a22fc405d03b91e127cd78c62f","original_commit_id":"69d01a4292cfe2a22fc405d03b91e127cd78c62f","user":{"login":"hurf","id":4618015,"avatar_url":"https://avatars.githubusercontent.com/u/4618015?v=3","gravatar_id":"","url":"https://api.github.com/users/hurf","html_url":"https://github.com/hurf","followers_url":"https://api.github.com/users/hurf/followers","following_url":"https://api.github.com/users/hurf/following{/other_user}","gists_url":"https://api.github.com/users/hurf/gists{/gist_id}","starred_url":"https://api.github.com/users/hurf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hurf/subscriptions","organizations_url":"https://api.github.com/users/hurf/orgs","repos_url":"https://api.github.com/users/hurf/repos","events_url":"https://api.github.com/users/hurf/events{/privacy}","received_events_url":"https://api.github.com/users/hurf/received_events","type":"User","site_admin":false},"body":"Good catch, I'll fix it.","created_at":"2015-08-17T00:49:58Z","updated_at":"2015-08-17T00:49:58Z","html_url":"https://github.com/dustin/go-humanize/pull/26#discussion_r37153247","pull_request_url":"https://api.github.com/repos/dustin/go-humanize/pulls/26","_links":{"self":{"href":"https://api.github.com/repos/dustin/go-humanize/pulls/comments/37153247"},"html":{"href":"https://github.com/dustin/go-humanize/pull/26#discussion_r37153247"},"pull_request":{"href":"https://api.github.com/repos/dustin/go-humanize/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/dustin/go-humanize/pulls/26","id":41863717,"html_url":"https://github.com/dustin/go-humanize/pull/26","diff_url":"https://github.com/dustin/go-humanize/pull/26.diff","patch_url":"https://github.com/dustin/go-humanize/pull/26.patch","issue_url":"https://api.github.com/repos/dustin/go-humanize/issues/26","number":26,"state":"open","locked":false,"title":"Allow custom defined time format.","user":{"login":"hurf","id":4618015,"avatar_url":"https://avatars.githubusercontent.com/u/4618015?v=3","gravatar_id":"","url":"https://api.github.com/users/hurf","html_url":"https://github.com/hurf","followers_url":"https://api.github.com/users/hurf/followers","following_url":"https://api.github.com/users/hurf/following{/other_user}","gists_url":"https://api.github.com/users/hurf/gists{/gist_id}","starred_url":"https://api.github.com/users/hurf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hurf/subscriptions","organizations_url":"https://api.github.com/users/hurf/orgs","repos_url":"https://api.github.com/users/hurf/repos","events_url":"https://api.github.com/users/hurf/events{/privacy}","received_events_url":"https://api.github.com/users/hurf/received_events","type":"User","site_admin":false},"body":"Closes: #25\r\n\r\nAdd a new func to allow user to customize units and output format.\r\n\r\neg. Users can use something like '12s ago' or '21 days later' (skipped the 'week' unit).","created_at":"2015-08-07T06:41:27Z","updated_at":"2015-08-17T00:49:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cb6b418ed47030783e9d62fd57f9eedff016a3bf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dustin/go-humanize/pulls/26/commits","review_comments_url":"https://api.github.com/repos/dustin/go-humanize/pulls/26/comments","review_comment_url":"https://api.github.com/repos/dustin/go-humanize/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dustin/go-humanize/issues/26/comments","statuses_url":"https://api.github.com/repos/dustin/go-humanize/statuses/69d01a4292cfe2a22fc405d03b91e127cd78c62f","head":{"label":"hurf:custom_time_format","ref":"custom_time_format","sha":"69d01a4292cfe2a22fc405d03b91e127cd78c62f","user":{"login":"hurf","id":4618015,"avatar_url":"https://avatars.githubusercontent.com/u/4618015?v=3","gravatar_id":"","url":"https://api.github.com/users/hurf","html_url":"https://github.com/hurf","followers_url":"https://api.github.com/users/hurf/followers","following_url":"https://api.github.com/users/hurf/following{/other_user}","gists_url":"https://api.github.com/users/hurf/gists{/gist_id}","starred_url":"https://api.github.com/users/hurf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hurf/subscriptions","organizations_url":"https://api.github.com/users/hurf/orgs","repos_url":"https://api.github.com/users/hurf/repos","events_url":"https://api.github.com/users/hurf/events{/privacy}","received_events_url":"https://api.github.com/users/hurf/received_events","type":"User","site_admin":false},"repo":{"id":40344019,"name":"go-humanize","full_name":"hurf/go-humanize","owner":{"login":"hurf","id":4618015,"avatar_url":"https://avatars.githubusercontent.com/u/4618015?v=3","gravatar_id":"","url":"https://api.github.com/users/hurf","html_url":"https://github.com/hurf","followers_url":"https://api.github.com/users/hurf/followers","following_url":"https://api.github.com/users/hurf/following{/other_user}","gists_url":"https://api.github.com/users/hurf/gists{/gist_id}","starred_url":"https://api.github.com/users/hurf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hurf/subscriptions","organizations_url":"https://api.github.com/users/hurf/orgs","repos_url":"https://api.github.com/users/hurf/repos","events_url":"https://api.github.com/users/hurf/events{/privacy}","received_events_url":"https://api.github.com/users/hurf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hurf/go-humanize","description":"Go Humans! (formatters for units to human friendly sizes)","fork":true,"url":"https://api.github.com/repos/hurf/go-humanize","forks_url":"https://api.github.com/repos/hurf/go-humanize/forks","keys_url":"https://api.github.com/repos/hurf/go-humanize/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hurf/go-humanize/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hurf/go-humanize/teams","hooks_url":"https://api.github.com/repos/hurf/go-humanize/hooks","issue_events_url":"https://api.github.com/repos/hurf/go-humanize/issues/events{/number}","events_url":"https://api.github.com/repos/hurf/go-humanize/events","assignees_url":"https://api.github.com/repos/hurf/go-humanize/assignees{/user}","branches_url":"https://api.github.com/repos/hurf/go-humanize/branches{/branch}","tags_url":"https://api.github.com/repos/hurf/go-humanize/tags","blobs_url":"https://api.github.com/repos/hurf/go-humanize/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hurf/go-humanize/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hurf/go-humanize/git/refs{/sha}","trees_url":"https://api.github.com/repos/hurf/go-humanize/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hurf/go-humanize/statuses/{sha}","languages_url":"https://api.github.com/repos/hurf/go-humanize/languages","stargazers_url":"https://api.github.com/repos/hurf/go-humanize/stargazers","contributors_url":"https://api.github.com/repos/hurf/go-humanize/contributors","subscribers_url":"https://api.github.com/repos/hurf/go-humanize/subscribers","subscription_url":"https://api.github.com/repos/hurf/go-humanize/subscription","commits_url":"https://api.github.com/repos/hurf/go-humanize/commits{/sha}","git_commits_url":"https://api.github.com/repos/hurf/go-humanize/git/commits{/sha}","comments_url":"https://api.github.com/repos/hurf/go-humanize/comments{/number}","issue_comment_url":"https://api.github.com/repos/hurf/go-humanize/issues/comments{/number}","contents_url":"https://api.github.com/repos/hurf/go-humanize/contents/{+path}","compare_url":"https://api.github.com/repos/hurf/go-humanize/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hurf/go-humanize/merges","archive_url":"https://api.github.com/repos/hurf/go-humanize/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hurf/go-humanize/downloads","issues_url":"https://api.github.com/repos/hurf/go-humanize/issues{/number}","pulls_url":"https://api.github.com/repos/hurf/go-humanize/pulls{/number}","milestones_url":"https://api.github.com/repos/hurf/go-humanize/milestones{/number}","notifications_url":"https://api.github.com/repos/hurf/go-humanize/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hurf/go-humanize/labels{/name}","releases_url":"https://api.github.com/repos/hurf/go-humanize/releases{/id}","created_at":"2015-08-07T06:04:44Z","updated_at":"2015-08-07T06:04:45Z","pushed_at":"2015-08-12T12:43:38Z","git_url":"git://github.com/hurf/go-humanize.git","ssh_url":"git@github.com:hurf/go-humanize.git","clone_url":"https://github.com/hurf/go-humanize.git","svn_url":"https://github.com/hurf/go-humanize","homepage":"http://godoc.org/github.com/dustin/go-humanize","size":160,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dustin:master","ref":"master","sha":"1c212aae1d02984808182b98b0da7a3e07e4c770","user":{"login":"dustin","id":1779,"avatar_url":"https://avatars.githubusercontent.com/u/1779?v=3","gravatar_id":"","url":"https://api.github.com/users/dustin","html_url":"https://github.com/dustin","followers_url":"https://api.github.com/users/dustin/followers","following_url":"https://api.github.com/users/dustin/following{/other_user}","gists_url":"https://api.github.com/users/dustin/gists{/gist_id}","starred_url":"https://api.github.com/users/dustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dustin/subscriptions","organizations_url":"https://api.github.com/users/dustin/orgs","repos_url":"https://api.github.com/users/dustin/repos","events_url":"https://api.github.com/users/dustin/events{/privacy}","received_events_url":"https://api.github.com/users/dustin/received_events","type":"User","site_admin":false},"repo":{"id":3168225,"name":"go-humanize","full_name":"dustin/go-humanize","owner":{"login":"dustin","id":1779,"avatar_url":"https://avatars.githubusercontent.com/u/1779?v=3","gravatar_id":"","url":"https://api.github.com/users/dustin","html_url":"https://github.com/dustin","followers_url":"https://api.github.com/users/dustin/followers","following_url":"https://api.github.com/users/dustin/following{/other_user}","gists_url":"https://api.github.com/users/dustin/gists{/gist_id}","starred_url":"https://api.github.com/users/dustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dustin/subscriptions","organizations_url":"https://api.github.com/users/dustin/orgs","repos_url":"https://api.github.com/users/dustin/repos","events_url":"https://api.github.com/users/dustin/events{/privacy}","received_events_url":"https://api.github.com/users/dustin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dustin/go-humanize","description":"Go Humans! (formatters for units to human friendly sizes)","fork":false,"url":"https://api.github.com/repos/dustin/go-humanize","forks_url":"https://api.github.com/repos/dustin/go-humanize/forks","keys_url":"https://api.github.com/repos/dustin/go-humanize/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dustin/go-humanize/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dustin/go-humanize/teams","hooks_url":"https://api.github.com/repos/dustin/go-humanize/hooks","issue_events_url":"https://api.github.com/repos/dustin/go-humanize/issues/events{/number}","events_url":"https://api.github.com/repos/dustin/go-humanize/events","assignees_url":"https://api.github.com/repos/dustin/go-humanize/assignees{/user}","branches_url":"https://api.github.com/repos/dustin/go-humanize/branches{/branch}","tags_url":"https://api.github.com/repos/dustin/go-humanize/tags","blobs_url":"https://api.github.com/repos/dustin/go-humanize/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dustin/go-humanize/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dustin/go-humanize/git/refs{/sha}","trees_url":"https://api.github.com/repos/dustin/go-humanize/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dustin/go-humanize/statuses/{sha}","languages_url":"https://api.github.com/repos/dustin/go-humanize/languages","stargazers_url":"https://api.github.com/repos/dustin/go-humanize/stargazers","contributors_url":"https://api.github.com/repos/dustin/go-humanize/contributors","subscribers_url":"https://api.github.com/repos/dustin/go-humanize/subscribers","subscription_url":"https://api.github.com/repos/dustin/go-humanize/subscription","commits_url":"https://api.github.com/repos/dustin/go-humanize/commits{/sha}","git_commits_url":"https://api.github.com/repos/dustin/go-humanize/git/commits{/sha}","comments_url":"https://api.github.com/repos/dustin/go-humanize/comments{/number}","issue_comment_url":"https://api.github.com/repos/dustin/go-humanize/issues/comments{/number}","contents_url":"https://api.github.com/repos/dustin/go-humanize/contents/{+path}","compare_url":"https://api.github.com/repos/dustin/go-humanize/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dustin/go-humanize/merges","archive_url":"https://api.github.com/repos/dustin/go-humanize/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dustin/go-humanize/downloads","issues_url":"https://api.github.com/repos/dustin/go-humanize/issues{/number}","pulls_url":"https://api.github.com/repos/dustin/go-humanize/pulls{/number}","milestones_url":"https://api.github.com/repos/dustin/go-humanize/milestones{/number}","notifications_url":"https://api.github.com/repos/dustin/go-humanize/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dustin/go-humanize/labels{/name}","releases_url":"https://api.github.com/repos/dustin/go-humanize/releases{/id}","created_at":"2012-01-13T03:48:55Z","updated_at":"2015-08-16T12:32:19Z","pushed_at":"2015-08-12T12:43:39Z","git_url":"git://github.com/dustin/go-humanize.git","ssh_url":"git@github.com:dustin/go-humanize.git","clone_url":"https://github.com/dustin/go-humanize.git","svn_url":"https://github.com/dustin/go-humanize","homepage":"https://godoc.org/github.com/dustin/go-humanize","size":593,"stargazers_count":510,"watchers_count":510,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":48,"mirror_url":null,"open_issues_count":9,"forks":48,"open_issues":9,"watchers":510,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dustin/go-humanize/pulls/26"},"html":{"href":"https://github.com/dustin/go-humanize/pull/26"},"issue":{"href":"https://api.github.com/repos/dustin/go-humanize/issues/26"},"comments":{"href":"https://api.github.com/repos/dustin/go-humanize/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/dustin/go-humanize/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/dustin/go-humanize/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dustin/go-humanize/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/dustin/go-humanize/statuses/69d01a4292cfe2a22fc405d03b91e127cd78c62f"}}}}