{"action":"created","comment":{"url":"https://api.github.com/repos/weaveworks/scope/pulls/comments/72411946","id":72411946,"diff_hunk":"@@ -90,27 +90,42 @@ func (m LatestMap) Lookup(key string) (string, bool) {\n \treturn v, ok\n }\n \n-// LookupEntry returns the raw entry for the given key.\n-func (m LatestMap) LookupEntry(key string) (string, time.Time, bool) {\n+// LookupEntryExt returns the raw entry for the given key.\n+func (m LatestMap) LookupEntryExt(key string) (interface{}, time.Time, bool) {\n \tif m.Map == nil {\n-\t\treturn \"\", time.Time{}, false\n+\t\treturn nil, time.Time{}, false\n \t}\n \tvalue, ok := m.Map.Lookup(key)\n \tif !ok {\n-\t\treturn \"\", time.Time{}, false\n+\t\treturn nil, time.Time{}, false\n \t}\n \te := value.(LatestEntry)\n \treturn e.Value, e.Timestamp, true\n }\n \n-// Set the value for the given key.\n-func (m LatestMap) Set(key string, timestamp time.Time, value string) LatestMap {\n+// LookupEntry returns the raw entry for the given key.\n+func (m LatestMap) LookupEntry(key string) (string, time.Time, bool) {\n+\tstr := \"\"\n+\tvalue, timestamp, ok := m.LookupEntryExt(key)\n+\tif value != nil {\n+\t\tstr = fmt.Sprintf(\"%s\", value)\n+\t}\n+\treturn str, timestamp, ok\n+}\n+\n+// SetExt sets the value for the given key.\n+func (m LatestMap) SetExt(key string, timestamp time.Time, value interface{}) LatestMap {\n \tif m.Map == nil {\n \t\tm = EmptyLatestMap\n \t}\n \treturn LatestMap{m.Map.Set(key, LatestEntry{timestamp, value})}\n }\n \n+// Set the value for the given key.\n+func (m LatestMap) Set(key string, timestamp time.Time, value string) LatestMap {\n+\treturn m.SetExt(key, timestamp, value)\n+}","path":"report/latest_map.go","position":55,"original_position":55,"commit_id":"4b537fae6292652edcad80f646d117c0982306c3","original_commit_id":"4b537fae6292652edcad80f646d117c0982306c3","user":{"login":"paulbellamy","id":250199,"avatar_url":"https://avatars.githubusercontent.com/u/250199?v=3","gravatar_id":"","url":"https://api.github.com/users/paulbellamy","html_url":"https://github.com/paulbellamy","followers_url":"https://api.github.com/users/paulbellamy/followers","following_url":"https://api.github.com/users/paulbellamy/following{/other_user}","gists_url":"https://api.github.com/users/paulbellamy/gists{/gist_id}","starred_url":"https://api.github.com/users/paulbellamy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulbellamy/subscriptions","organizations_url":"https://api.github.com/users/paulbellamy/orgs","repos_url":"https://api.github.com/users/paulbellamy/repos","events_url":"https://api.github.com/users/paulbellamy/events{/privacy}","received_events_url":"https://api.github.com/users/paulbellamy/received_events","type":"User","site_admin":false},"body":"SetExt was a bit unclear to me. What do you think about:\r\n```\r\nfunc (m LatestMap) Set(key string, timestamp time.Time, value interface{}) LatestMap\r\nfunc (m LatestMap) SetString(key string, timestamp time.Time, value string) LatestMap\r\n```\r\n\r\ni.e. making the interface{} one the \"default\", then having different names for the more-specifically-typed variants...","created_at":"2016-07-27T09:55:58Z","updated_at":"2016-07-27T09:55:58Z","html_url":"https://github.com/weaveworks/scope/pull/1682#discussion_r72411946","pull_request_url":"https://api.github.com/repos/weaveworks/scope/pulls/1682","_links":{"self":{"href":"https://api.github.com/repos/weaveworks/scope/pulls/comments/72411946"},"html":{"href":"https://github.com/weaveworks/scope/pull/1682#discussion_r72411946"},"pull_request":{"href":"https://api.github.com/repos/weaveworks/scope/pulls/1682"}}},"pull_request":{"url":"https://api.github.com/repos/weaveworks/scope/pulls/1682","id":77459950,"html_url":"https://github.com/weaveworks/scope/pull/1682","diff_url":"https://github.com/weaveworks/scope/pull/1682.diff","patch_url":"https://github.com/weaveworks/scope/pull/1682.patch","issue_url":"https://api.github.com/repos/weaveworks/scope/issues/1682","number":1682,"state":"open","locked":false,"title":"RFC: forwarding control requests to plugins","user":{"login":"krnowak","id":96081,"avatar_url":"https://avatars.githubusercontent.com/u/96081?v=3","gravatar_id":"","url":"https://api.github.com/users/krnowak","html_url":"https://github.com/krnowak","followers_url":"https://api.github.com/users/krnowak/followers","following_url":"https://api.github.com/users/krnowak/following{/other_user}","gists_url":"https://api.github.com/users/krnowak/gists{/gist_id}","starred_url":"https://api.github.com/users/krnowak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krnowak/subscriptions","organizations_url":"https://api.github.com/users/krnowak/orgs","repos_url":"https://api.github.com/users/krnowak/repos","events_url":"https://api.github.com/users/krnowak/events{/privacy}","received_events_url":"https://api.github.com/users/krnowak/received_events","type":"User","site_admin":false},"body":"This is a tentative PR that implements forwarding control requests to plugins.\r\n\r\n~~Problems so far:~~\r\n\r\n- ~~I made iowait example plugin a controller (adds a button that switches between showing iowait and idle), but:~~\r\n  - ~~GUI shows plugin's statistics in a separate node, while it used to be in the same one~~\r\n  - ~~GUI shows no button from plugin~~\r\n","created_at":"2016-07-14T13:54:40Z","updated_at":"2016-07-27T09:55:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7ec6157a6c39789013edd1590d85aee4a55eeb8c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/weaveworks/scope/pulls/1682/commits","review_comments_url":"https://api.github.com/repos/weaveworks/scope/pulls/1682/comments","review_comment_url":"https://api.github.com/repos/weaveworks/scope/pulls/comments{/number}","comments_url":"https://api.github.com/repos/weaveworks/scope/issues/1682/comments","statuses_url":"https://api.github.com/repos/weaveworks/scope/statuses/4b537fae6292652edcad80f646d117c0982306c3","head":{"label":"kinvolk:krnowak/plugin-controls","ref":"krnowak/plugin-controls","sha":"4b537fae6292652edcad80f646d117c0982306c3","user":{"login":"kinvolk","id":14073052,"avatar_url":"https://avatars.githubusercontent.com/u/14073052?v=3","gravatar_id":"","url":"https://api.github.com/users/kinvolk","html_url":"https://github.com/kinvolk","followers_url":"https://api.github.com/users/kinvolk/followers","following_url":"https://api.github.com/users/kinvolk/following{/other_user}","gists_url":"https://api.github.com/users/kinvolk/gists{/gist_id}","starred_url":"https://api.github.com/users/kinvolk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kinvolk/subscriptions","organizations_url":"https://api.github.com/users/kinvolk/orgs","repos_url":"https://api.github.com/users/kinvolk/repos","events_url":"https://api.github.com/users/kinvolk/events{/privacy}","received_events_url":"https://api.github.com/users/kinvolk/received_events","type":"Organization","site_admin":false},"repo":{"id":52687285,"name":"scope","full_name":"kinvolk/scope","owner":{"login":"kinvolk","id":14073052,"avatar_url":"https://avatars.githubusercontent.com/u/14073052?v=3","gravatar_id":"","url":"https://api.github.com/users/kinvolk","html_url":"https://github.com/kinvolk","followers_url":"https://api.github.com/users/kinvolk/followers","following_url":"https://api.github.com/users/kinvolk/following{/other_user}","gists_url":"https://api.github.com/users/kinvolk/gists{/gist_id}","starred_url":"https://api.github.com/users/kinvolk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kinvolk/subscriptions","organizations_url":"https://api.github.com/users/kinvolk/orgs","repos_url":"https://api.github.com/users/kinvolk/repos","events_url":"https://api.github.com/users/kinvolk/events{/privacy}","received_events_url":"https://api.github.com/users/kinvolk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kinvolk/scope","description":"Monitoring, visualisation & management for Docker","fork":true,"url":"https://api.github.com/repos/kinvolk/scope","forks_url":"https://api.github.com/repos/kinvolk/scope/forks","keys_url":"https://api.github.com/repos/kinvolk/scope/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kinvolk/scope/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kinvolk/scope/teams","hooks_url":"https://api.github.com/repos/kinvolk/scope/hooks","issue_events_url":"https://api.github.com/repos/kinvolk/scope/issues/events{/number}","events_url":"https://api.github.com/repos/kinvolk/scope/events","assignees_url":"https://api.github.com/repos/kinvolk/scope/assignees{/user}","branches_url":"https://api.github.com/repos/kinvolk/scope/branches{/branch}","tags_url":"https://api.github.com/repos/kinvolk/scope/tags","blobs_url":"https://api.github.com/repos/kinvolk/scope/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kinvolk/scope/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kinvolk/scope/git/refs{/sha}","trees_url":"https://api.github.com/repos/kinvolk/scope/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kinvolk/scope/statuses/{sha}","languages_url":"https://api.github.com/repos/kinvolk/scope/languages","stargazers_url":"https://api.github.com/repos/kinvolk/scope/stargazers","contributors_url":"https://api.github.com/repos/kinvolk/scope/contributors","subscribers_url":"https://api.github.com/repos/kinvolk/scope/subscribers","subscription_url":"https://api.github.com/repos/kinvolk/scope/subscription","commits_url":"https://api.github.com/repos/kinvolk/scope/commits{/sha}","git_commits_url":"https://api.github.com/repos/kinvolk/scope/git/commits{/sha}","comments_url":"https://api.github.com/repos/kinvolk/scope/comments{/number}","issue_comment_url":"https://api.github.com/repos/kinvolk/scope/issues/comments{/number}","contents_url":"https://api.github.com/repos/kinvolk/scope/contents/{+path}","compare_url":"https://api.github.com/repos/kinvolk/scope/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kinvolk/scope/merges","archive_url":"https://api.github.com/repos/kinvolk/scope/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kinvolk/scope/downloads","issues_url":"https://api.github.com/repos/kinvolk/scope/issues{/number}","pulls_url":"https://api.github.com/repos/kinvolk/scope/pulls{/number}","milestones_url":"https://api.github.com/repos/kinvolk/scope/milestones{/number}","notifications_url":"https://api.github.com/repos/kinvolk/scope/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kinvolk/scope/labels{/name}","releases_url":"https://api.github.com/repos/kinvolk/scope/releases{/id}","deployments_url":"https://api.github.com/repos/kinvolk/scope/deployments","created_at":"2016-02-27T20:29:49Z","updated_at":"2016-02-27T20:29:51Z","pushed_at":"2016-07-26T14:37:31Z","git_url":"git://github.com/kinvolk/scope.git","ssh_url":"git@github.com:kinvolk/scope.git","clone_url":"https://github.com/kinvolk/scope.git","svn_url":"https://github.com/kinvolk/scope","homepage":"http://weave.works/product/scope/","size":47215,"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":"weaveworks:master","ref":"master","sha":"78199aa25f99e2dec1142e4510ecf78ce82fcc72","user":{"login":"weaveworks","id":9976052,"avatar_url":"https://avatars.githubusercontent.com/u/9976052?v=3","gravatar_id":"","url":"https://api.github.com/users/weaveworks","html_url":"https://github.com/weaveworks","followers_url":"https://api.github.com/users/weaveworks/followers","following_url":"https://api.github.com/users/weaveworks/following{/other_user}","gists_url":"https://api.github.com/users/weaveworks/gists{/gist_id}","starred_url":"https://api.github.com/users/weaveworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaveworks/subscriptions","organizations_url":"https://api.github.com/users/weaveworks/orgs","repos_url":"https://api.github.com/users/weaveworks/repos","events_url":"https://api.github.com/users/weaveworks/events{/privacy}","received_events_url":"https://api.github.com/users/weaveworks/received_events","type":"Organization","site_admin":false},"repo":{"id":34659664,"name":"scope","full_name":"weaveworks/scope","owner":{"login":"weaveworks","id":9976052,"avatar_url":"https://avatars.githubusercontent.com/u/9976052?v=3","gravatar_id":"","url":"https://api.github.com/users/weaveworks","html_url":"https://github.com/weaveworks","followers_url":"https://api.github.com/users/weaveworks/followers","following_url":"https://api.github.com/users/weaveworks/following{/other_user}","gists_url":"https://api.github.com/users/weaveworks/gists{/gist_id}","starred_url":"https://api.github.com/users/weaveworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaveworks/subscriptions","organizations_url":"https://api.github.com/users/weaveworks/orgs","repos_url":"https://api.github.com/users/weaveworks/repos","events_url":"https://api.github.com/users/weaveworks/events{/privacy}","received_events_url":"https://api.github.com/users/weaveworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/weaveworks/scope","description":"Monitoring, visualisation & management for Docker & Kubernetes","fork":false,"url":"https://api.github.com/repos/weaveworks/scope","forks_url":"https://api.github.com/repos/weaveworks/scope/forks","keys_url":"https://api.github.com/repos/weaveworks/scope/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weaveworks/scope/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weaveworks/scope/teams","hooks_url":"https://api.github.com/repos/weaveworks/scope/hooks","issue_events_url":"https://api.github.com/repos/weaveworks/scope/issues/events{/number}","events_url":"https://api.github.com/repos/weaveworks/scope/events","assignees_url":"https://api.github.com/repos/weaveworks/scope/assignees{/user}","branches_url":"https://api.github.com/repos/weaveworks/scope/branches{/branch}","tags_url":"https://api.github.com/repos/weaveworks/scope/tags","blobs_url":"https://api.github.com/repos/weaveworks/scope/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weaveworks/scope/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weaveworks/scope/git/refs{/sha}","trees_url":"https://api.github.com/repos/weaveworks/scope/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weaveworks/scope/statuses/{sha}","languages_url":"https://api.github.com/repos/weaveworks/scope/languages","stargazers_url":"https://api.github.com/repos/weaveworks/scope/stargazers","contributors_url":"https://api.github.com/repos/weaveworks/scope/contributors","subscribers_url":"https://api.github.com/repos/weaveworks/scope/subscribers","subscription_url":"https://api.github.com/repos/weaveworks/scope/subscription","commits_url":"https://api.github.com/repos/weaveworks/scope/commits{/sha}","git_commits_url":"https://api.github.com/repos/weaveworks/scope/git/commits{/sha}","comments_url":"https://api.github.com/repos/weaveworks/scope/comments{/number}","issue_comment_url":"https://api.github.com/repos/weaveworks/scope/issues/comments{/number}","contents_url":"https://api.github.com/repos/weaveworks/scope/contents/{+path}","compare_url":"https://api.github.com/repos/weaveworks/scope/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weaveworks/scope/merges","archive_url":"https://api.github.com/repos/weaveworks/scope/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weaveworks/scope/downloads","issues_url":"https://api.github.com/repos/weaveworks/scope/issues{/number}","pulls_url":"https://api.github.com/repos/weaveworks/scope/pulls{/number}","milestones_url":"https://api.github.com/repos/weaveworks/scope/milestones{/number}","notifications_url":"https://api.github.com/repos/weaveworks/scope/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weaveworks/scope/labels{/name}","releases_url":"https://api.github.com/repos/weaveworks/scope/releases{/id}","deployments_url":"https://api.github.com/repos/weaveworks/scope/deployments","created_at":"2015-04-27T10:12:35Z","updated_at":"2016-07-24T14:20:18Z","pushed_at":"2016-07-27T09:41:34Z","git_url":"git://github.com/weaveworks/scope.git","ssh_url":"git@github.com:weaveworks/scope.git","clone_url":"https://github.com/weaveworks/scope.git","svn_url":"https://github.com/weaveworks/scope","homepage":"https://www.weave.works/product/weave-scope/","size":64954,"stargazers_count":725,"watchers_count":725,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":60,"mirror_url":null,"open_issues_count":234,"forks":60,"open_issues":234,"watchers":725,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/weaveworks/scope/pulls/1682"},"html":{"href":"https://github.com/weaveworks/scope/pull/1682"},"issue":{"href":"https://api.github.com/repos/weaveworks/scope/issues/1682"},"comments":{"href":"https://api.github.com/repos/weaveworks/scope/issues/1682/comments"},"review_comments":{"href":"https://api.github.com/repos/weaveworks/scope/pulls/1682/comments"},"review_comment":{"href":"https://api.github.com/repos/weaveworks/scope/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/weaveworks/scope/pulls/1682/commits"},"statuses":{"href":"https://api.github.com/repos/weaveworks/scope/statuses/4b537fae6292652edcad80f646d117c0982306c3"}}}}
{"actor":{"display_login":"paulbellamy"}}