{"action":"created","comment":{"url":"https://api.github.com/repos/ipfs/go-ipfs/pulls/comments/89371519","pull_request_review_id":9917870,"id":89371519,"diff_hunk":"@@ -118,16 +122,33 @@ To use, the daemon must be run with '--enable-pubsub-experiment'.\n \t},\n \tMarshalers: cmds.MarshalerMap{\n \t\tcmds.Text: getPsMsgMarshaler(func(m *floodsub.Message) (io.Reader, error) {\n+\t\t\tif m.Message == nil {\n+\t\t\t\treturn strings.NewReader(\"\"), nil\n+\t\t\t}\n+\n \t\t\treturn bytes.NewReader(m.Data), nil\n \t\t}),\n \t\t\"ndpayload\": getPsMsgMarshaler(func(m *floodsub.Message) (io.Reader, error) {\n+\t\t\tif m.Message == nil {\n+\t\t\t\treturn strings.NewReader(\"\\n\"), nil\n+\t\t\t}\n+\n \t\t\tm.Data = append(m.Data, '\\n')\n \t\t\treturn bytes.NewReader(m.Data), nil\n \t\t}),\n \t\t\"lenpayload\": getPsMsgMarshaler(func(m *floodsub.Message) (io.Reader, error) {\n \t\t\tbuf := make([]byte, 8)\n-\t\t\tn := binary.PutUvarint(buf, uint64(len(m.Data)))\n-\t\t\treturn io.MultiReader(bytes.NewReader(buf[:n]), bytes.NewReader(m.Data)), nil\n+\t\t\tvar (\n+\t\t\t\tn    int","path":"core/commands/pubsub.go","position":46,"original_position":46,"commit_id":"47cb7d138482030e18db0df6bd880a3d82da5254","original_commit_id":"47cb7d138482030e18db0df6bd880a3d82da5254","user":{"login":"keks","id":146678,"avatar_url":"https://avatars.githubusercontent.com/u/146678?v=3","gravatar_id":"","url":"https://api.github.com/users/keks","html_url":"https://github.com/keks","followers_url":"https://api.github.com/users/keks/followers","following_url":"https://api.github.com/users/keks/following{/other_user}","gists_url":"https://api.github.com/users/keks/gists{/gist_id}","starred_url":"https://api.github.com/users/keks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keks/subscriptions","organizations_url":"https://api.github.com/users/keks/orgs","repos_url":"https://api.github.com/users/keks/repos","events_url":"https://api.github.com/users/keks/events{/privacy}","received_events_url":"https://api.github.com/users/keks/received_events","type":"User","site_admin":false},"body":"The idea here is that `data` is nil if `m.Message` is nil.","created_at":"2016-11-23T18:13:16Z","updated_at":"2016-11-23T18:13:16Z","html_url":"https://github.com/ipfs/go-ipfs/pull/3416#discussion_r89371519","pull_request_url":"https://api.github.com/repos/ipfs/go-ipfs/pulls/3416","_links":{"self":{"href":"https://api.github.com/repos/ipfs/go-ipfs/pulls/comments/89371519"},"html":{"href":"https://github.com/ipfs/go-ipfs/pull/3416#discussion_r89371519"},"pull_request":{"href":"https://api.github.com/repos/ipfs/go-ipfs/pulls/3416"}}},"pull_request":{"url":"https://api.github.com/repos/ipfs/go-ipfs/pulls/3416","id":95050589,"html_url":"https://github.com/ipfs/go-ipfs/pull/3416","diff_url":"https://github.com/ipfs/go-ipfs/pull/3416.diff","patch_url":"https://github.com/ipfs/go-ipfs/pull/3416.patch","issue_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/3416","number":3416,"state":"open","locked":false,"title":"Send empty struct to pubsub cmd output to flush","user":{"login":"keks","id":146678,"avatar_url":"https://avatars.githubusercontent.com/u/146678?v=3","gravatar_id":"","url":"https://api.github.com/users/keks","html_url":"https://github.com/keks","followers_url":"https://api.github.com/users/keks/followers","following_url":"https://api.github.com/users/keks/following{/other_user}","gists_url":"https://api.github.com/users/keks/gists{/gist_id}","starred_url":"https://api.github.com/users/keks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keks/subscriptions","organizations_url":"https://api.github.com/users/keks/orgs","repos_url":"https://api.github.com/users/keks/repos","events_url":"https://api.github.com/users/keks/events{/privacy}","received_events_url":"https://api.github.com/users/keks/received_events","type":"User","site_admin":false},"body":"So the HTTP headers get sent","created_at":"2016-11-23T17:45:26Z","updated_at":"2016-11-23T18:13:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"36dafc654cf57e3db2476d822fa8dc51d0d684b3","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ipfs/go-ipfs/pulls/3416/commits","review_comments_url":"https://api.github.com/repos/ipfs/go-ipfs/pulls/3416/comments","review_comment_url":"https://api.github.com/repos/ipfs/go-ipfs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/3416/comments","statuses_url":"https://api.github.com/repos/ipfs/go-ipfs/statuses/47cb7d138482030e18db0df6bd880a3d82da5254","head":{"label":"keks:feat/instaflush","ref":"feat/instaflush","sha":"47cb7d138482030e18db0df6bd880a3d82da5254","user":{"login":"keks","id":146678,"avatar_url":"https://avatars.githubusercontent.com/u/146678?v=3","gravatar_id":"","url":"https://api.github.com/users/keks","html_url":"https://github.com/keks","followers_url":"https://api.github.com/users/keks/followers","following_url":"https://api.github.com/users/keks/following{/other_user}","gists_url":"https://api.github.com/users/keks/gists{/gist_id}","starred_url":"https://api.github.com/users/keks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keks/subscriptions","organizations_url":"https://api.github.com/users/keks/orgs","repos_url":"https://api.github.com/users/keks/repos","events_url":"https://api.github.com/users/keks/events{/privacy}","received_events_url":"https://api.github.com/users/keks/received_events","type":"User","site_admin":false},"repo":{"id":70961609,"name":"go-ipfs","full_name":"keks/go-ipfs","owner":{"login":"keks","id":146678,"avatar_url":"https://avatars.githubusercontent.com/u/146678?v=3","gravatar_id":"","url":"https://api.github.com/users/keks","html_url":"https://github.com/keks","followers_url":"https://api.github.com/users/keks/followers","following_url":"https://api.github.com/users/keks/following{/other_user}","gists_url":"https://api.github.com/users/keks/gists{/gist_id}","starred_url":"https://api.github.com/users/keks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keks/subscriptions","organizations_url":"https://api.github.com/users/keks/orgs","repos_url":"https://api.github.com/users/keks/repos","events_url":"https://api.github.com/users/keks/events{/privacy}","received_events_url":"https://api.github.com/users/keks/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/keks/go-ipfs","description":"IPFS implementation in go","fork":true,"url":"https://api.github.com/repos/keks/go-ipfs","forks_url":"https://api.github.com/repos/keks/go-ipfs/forks","keys_url":"https://api.github.com/repos/keks/go-ipfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keks/go-ipfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keks/go-ipfs/teams","hooks_url":"https://api.github.com/repos/keks/go-ipfs/hooks","issue_events_url":"https://api.github.com/repos/keks/go-ipfs/issues/events{/number}","events_url":"https://api.github.com/repos/keks/go-ipfs/events","assignees_url":"https://api.github.com/repos/keks/go-ipfs/assignees{/user}","branches_url":"https://api.github.com/repos/keks/go-ipfs/branches{/branch}","tags_url":"https://api.github.com/repos/keks/go-ipfs/tags","blobs_url":"https://api.github.com/repos/keks/go-ipfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keks/go-ipfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keks/go-ipfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/keks/go-ipfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keks/go-ipfs/statuses/{sha}","languages_url":"https://api.github.com/repos/keks/go-ipfs/languages","stargazers_url":"https://api.github.com/repos/keks/go-ipfs/stargazers","contributors_url":"https://api.github.com/repos/keks/go-ipfs/contributors","subscribers_url":"https://api.github.com/repos/keks/go-ipfs/subscribers","subscription_url":"https://api.github.com/repos/keks/go-ipfs/subscription","commits_url":"https://api.github.com/repos/keks/go-ipfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/keks/go-ipfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/keks/go-ipfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/keks/go-ipfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/keks/go-ipfs/contents/{+path}","compare_url":"https://api.github.com/repos/keks/go-ipfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keks/go-ipfs/merges","archive_url":"https://api.github.com/repos/keks/go-ipfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keks/go-ipfs/downloads","issues_url":"https://api.github.com/repos/keks/go-ipfs/issues{/number}","pulls_url":"https://api.github.com/repos/keks/go-ipfs/pulls{/number}","milestones_url":"https://api.github.com/repos/keks/go-ipfs/milestones{/number}","notifications_url":"https://api.github.com/repos/keks/go-ipfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keks/go-ipfs/labels{/name}","releases_url":"https://api.github.com/repos/keks/go-ipfs/releases{/id}","deployments_url":"https://api.github.com/repos/keks/go-ipfs/deployments","created_at":"2016-10-15T02:39:29Z","updated_at":"2016-10-15T02:39:31Z","pushed_at":"2016-11-23T17:45:11Z","git_url":"git://github.com/keks/go-ipfs.git","ssh_url":"git@github.com:keks/go-ipfs.git","clone_url":"https://github.com/keks/go-ipfs.git","svn_url":"https://github.com/keks/go-ipfs","homepage":"https://github.com/ipfs/ipfs","size":26350,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"ipfs:master","ref":"master","sha":"ccb46fa9b6060a55bb0e4d6f1bc1e60dd3d17625","user":{"login":"ipfs","id":10536621,"avatar_url":"https://avatars.githubusercontent.com/u/10536621?v=3","gravatar_id":"","url":"https://api.github.com/users/ipfs","html_url":"https://github.com/ipfs","followers_url":"https://api.github.com/users/ipfs/followers","following_url":"https://api.github.com/users/ipfs/following{/other_user}","gists_url":"https://api.github.com/users/ipfs/gists{/gist_id}","starred_url":"https://api.github.com/users/ipfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipfs/subscriptions","organizations_url":"https://api.github.com/users/ipfs/orgs","repos_url":"https://api.github.com/users/ipfs/repos","events_url":"https://api.github.com/users/ipfs/events{/privacy}","received_events_url":"https://api.github.com/users/ipfs/received_events","type":"Organization","site_admin":false},"repo":{"id":21233191,"name":"go-ipfs","full_name":"ipfs/go-ipfs","owner":{"login":"ipfs","id":10536621,"avatar_url":"https://avatars.githubusercontent.com/u/10536621?v=3","gravatar_id":"","url":"https://api.github.com/users/ipfs","html_url":"https://github.com/ipfs","followers_url":"https://api.github.com/users/ipfs/followers","following_url":"https://api.github.com/users/ipfs/following{/other_user}","gists_url":"https://api.github.com/users/ipfs/gists{/gist_id}","starred_url":"https://api.github.com/users/ipfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipfs/subscriptions","organizations_url":"https://api.github.com/users/ipfs/orgs","repos_url":"https://api.github.com/users/ipfs/repos","events_url":"https://api.github.com/users/ipfs/events{/privacy}","received_events_url":"https://api.github.com/users/ipfs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ipfs/go-ipfs","description":"IPFS implementation in go","fork":false,"url":"https://api.github.com/repos/ipfs/go-ipfs","forks_url":"https://api.github.com/repos/ipfs/go-ipfs/forks","keys_url":"https://api.github.com/repos/ipfs/go-ipfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ipfs/go-ipfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ipfs/go-ipfs/teams","hooks_url":"https://api.github.com/repos/ipfs/go-ipfs/hooks","issue_events_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/events{/number}","events_url":"https://api.github.com/repos/ipfs/go-ipfs/events","assignees_url":"https://api.github.com/repos/ipfs/go-ipfs/assignees{/user}","branches_url":"https://api.github.com/repos/ipfs/go-ipfs/branches{/branch}","tags_url":"https://api.github.com/repos/ipfs/go-ipfs/tags","blobs_url":"https://api.github.com/repos/ipfs/go-ipfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ipfs/go-ipfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ipfs/go-ipfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/ipfs/go-ipfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ipfs/go-ipfs/statuses/{sha}","languages_url":"https://api.github.com/repos/ipfs/go-ipfs/languages","stargazers_url":"https://api.github.com/repos/ipfs/go-ipfs/stargazers","contributors_url":"https://api.github.com/repos/ipfs/go-ipfs/contributors","subscribers_url":"https://api.github.com/repos/ipfs/go-ipfs/subscribers","subscription_url":"https://api.github.com/repos/ipfs/go-ipfs/subscription","commits_url":"https://api.github.com/repos/ipfs/go-ipfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/ipfs/go-ipfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/ipfs/go-ipfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/ipfs/go-ipfs/contents/{+path}","compare_url":"https://api.github.com/repos/ipfs/go-ipfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ipfs/go-ipfs/merges","archive_url":"https://api.github.com/repos/ipfs/go-ipfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ipfs/go-ipfs/downloads","issues_url":"https://api.github.com/repos/ipfs/go-ipfs/issues{/number}","pulls_url":"https://api.github.com/repos/ipfs/go-ipfs/pulls{/number}","milestones_url":"https://api.github.com/repos/ipfs/go-ipfs/milestones{/number}","notifications_url":"https://api.github.com/repos/ipfs/go-ipfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ipfs/go-ipfs/labels{/name}","releases_url":"https://api.github.com/repos/ipfs/go-ipfs/releases{/id}","deployments_url":"https://api.github.com/repos/ipfs/go-ipfs/deployments","created_at":"2014-06-26T08:14:34Z","updated_at":"2016-11-23T17:57:31Z","pushed_at":"2016-11-23T17:45:26Z","git_url":"git://github.com/ipfs/go-ipfs.git","ssh_url":"git@github.com:ipfs/go-ipfs.git","clone_url":"https://github.com/ipfs/go-ipfs.git","svn_url":"https://github.com/ipfs/go-ipfs","homepage":"https://github.com/ipfs/ipfs","size":37495,"stargazers_count":2462,"watchers_count":2462,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":392,"mirror_url":null,"open_issues_count":536,"forks":392,"open_issues":536,"watchers":2462,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ipfs/go-ipfs/pulls/3416"},"html":{"href":"https://github.com/ipfs/go-ipfs/pull/3416"},"issue":{"href":"https://api.github.com/repos/ipfs/go-ipfs/issues/3416"},"comments":{"href":"https://api.github.com/repos/ipfs/go-ipfs/issues/3416/comments"},"review_comments":{"href":"https://api.github.com/repos/ipfs/go-ipfs/pulls/3416/comments"},"review_comment":{"href":"https://api.github.com/repos/ipfs/go-ipfs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ipfs/go-ipfs/pulls/3416/commits"},"statuses":{"href":"https://api.github.com/repos/ipfs/go-ipfs/statuses/47cb7d138482030e18db0df6bd880a3d82da5254"}}}}
{"actor":{"display_login":"keks"}}