{"action":"created","comment":{"url":"https://api.github.com/repos/pkg/sftp/pulls/comments/203681207","pull_request_review_id":138616518,"id":203681207,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMzY4MTIwNw==","diff_hunk":"@@ -0,0 +1,53 @@\n+package sftp\n+\n+type SSHFxpWritePacket struct {\n+\tID     uint32\n+\tHandle string\n+\tOffset uint64\n+\tLength uint32\n+\tData   []byte\n+}\n+\n+func (p SSHFxpWritePacket) Id() uint32 { return p.ID }\n+\n+func (p SSHFxpWritePacket) GetHandle() string { return p.Handle }\n+\n+func (p SSHFxpWritePacket) NotReadOnly() {}\n+\n+func (p SSHFxpWritePacket) MarshalBinary() ([]byte, error) {\n+\tl := 1 + 4 + // type(byte) + uint32\n+\t\t4 + len(p.Handle) +\n+\t\t8 + 4 + // uint64 + uint32\n+\t\tlen(p.Data)\n+\n+\tb := make([]byte, 0, l)\n+\tb = append(b, ssh_FXP_WRITE)\n+\tb = marshalUint32(b, p.ID)\n+\tb = marshalString(b, p.Handle)\n+\tb = marshalUint64(b, p.Offset)\n+\tb = marshalUint32(b, p.Length)\n+\tb = append(b, p.Data...)\n+\treturn b, nil\n+}\n+\n+func (p *SSHFxpWritePacket) UnmarshalBinary(b []byte) error {","path":"packet-write.go","position":33,"original_position":33,"commit_id":"068d4a685cb352cdadc84b2e40d577b5b43cc421","original_commit_id":"068d4a685cb352cdadc84b2e40d577b5b43cc421","user":{"login":"houndci-bot","id":6697940,"node_id":"MDQ6VXNlcjY2OTc5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"exported method SSHFxpWritePacket.UnmarshalBinary should have comment or be unexported","created_at":"2018-07-19T10:44:35Z","updated_at":"2018-07-19T10:44:36Z","html_url":"https://github.com/pkg/sftp/pull/259#discussion_r203681207","pull_request_url":"https://api.github.com/repos/pkg/sftp/pulls/259","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/pkg/sftp/pulls/comments/203681207"},"html":{"href":"https://github.com/pkg/sftp/pull/259#discussion_r203681207"},"pull_request":{"href":"https://api.github.com/repos/pkg/sftp/pulls/259"}}},"pull_request":{"url":"https://api.github.com/repos/pkg/sftp/pulls/259","id":202518319,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyNTE4MzE5","html_url":"https://github.com/pkg/sftp/pull/259","diff_url":"https://github.com/pkg/sftp/pull/259.diff","patch_url":"https://github.com/pkg/sftp/pull/259.patch","issue_url":"https://api.github.com/repos/pkg/sftp/issues/259","number":259,"state":"open","locked":false,"title":"Publish packet methods and refactor server.","user":{"login":"moriyoshi","id":18755,"node_id":"MDQ6VXNlcjE4NzU1","avatar_url":"https://avatars1.githubusercontent.com/u/18755?v=4","gravatar_id":"","url":"https://api.github.com/users/moriyoshi","html_url":"https://github.com/moriyoshi","followers_url":"https://api.github.com/users/moriyoshi/followers","following_url":"https://api.github.com/users/moriyoshi/following{/other_user}","gists_url":"https://api.github.com/users/moriyoshi/gists{/gist_id}","starred_url":"https://api.github.com/users/moriyoshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moriyoshi/subscriptions","organizations_url":"https://api.github.com/users/moriyoshi/orgs","repos_url":"https://api.github.com/users/moriyoshi/repos","events_url":"https://api.github.com/users/moriyoshi/events{/privacy}","received_events_url":"https://api.github.com/users/moriyoshi/received_events","type":"User","site_admin":false},"body":"I was playing with the library and wanted to do some low-level stuff above the FS layer, but it wouldn't allow me to do because packet handlers in `Server` are tightly coupled with the implementation and it is not hookable at all.\r\n\r\nThis is an attempt to publish its detail so one can extend the server based on the existing impleentation.\r\n","created_at":"2018-07-19T10:44:11Z","updated_at":"2018-07-19T10:44:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f1a9158d27415abc026a638d831f4129ca227841","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pkg/sftp/pulls/259/commits","review_comments_url":"https://api.github.com/repos/pkg/sftp/pulls/259/comments","review_comment_url":"https://api.github.com/repos/pkg/sftp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pkg/sftp/issues/259/comments","statuses_url":"https://api.github.com/repos/pkg/sftp/statuses/068d4a685cb352cdadc84b2e40d577b5b43cc421","head":{"label":"moriyoshi:moriyoshi/io-abstraction","ref":"moriyoshi/io-abstraction","sha":"068d4a685cb352cdadc84b2e40d577b5b43cc421","user":{"login":"moriyoshi","id":18755,"node_id":"MDQ6VXNlcjE4NzU1","avatar_url":"https://avatars1.githubusercontent.com/u/18755?v=4","gravatar_id":"","url":"https://api.github.com/users/moriyoshi","html_url":"https://github.com/moriyoshi","followers_url":"https://api.github.com/users/moriyoshi/followers","following_url":"https://api.github.com/users/moriyoshi/following{/other_user}","gists_url":"https://api.github.com/users/moriyoshi/gists{/gist_id}","starred_url":"https://api.github.com/users/moriyoshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moriyoshi/subscriptions","organizations_url":"https://api.github.com/users/moriyoshi/orgs","repos_url":"https://api.github.com/users/moriyoshi/repos","events_url":"https://api.github.com/users/moriyoshi/events{/privacy}","received_events_url":"https://api.github.com/users/moriyoshi/received_events","type":"User","site_admin":false},"repo":{"id":141467270,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE0NjcyNzA=","name":"sftp","full_name":"moriyoshi/sftp","owner":{"login":"moriyoshi","id":18755,"node_id":"MDQ6VXNlcjE4NzU1","avatar_url":"https://avatars1.githubusercontent.com/u/18755?v=4","gravatar_id":"","url":"https://api.github.com/users/moriyoshi","html_url":"https://github.com/moriyoshi","followers_url":"https://api.github.com/users/moriyoshi/followers","following_url":"https://api.github.com/users/moriyoshi/following{/other_user}","gists_url":"https://api.github.com/users/moriyoshi/gists{/gist_id}","starred_url":"https://api.github.com/users/moriyoshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moriyoshi/subscriptions","organizations_url":"https://api.github.com/users/moriyoshi/orgs","repos_url":"https://api.github.com/users/moriyoshi/repos","events_url":"https://api.github.com/users/moriyoshi/events{/privacy}","received_events_url":"https://api.github.com/users/moriyoshi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/moriyoshi/sftp","description":"SFTP support for the go.crypto/ssh package","fork":true,"url":"https://api.github.com/repos/moriyoshi/sftp","forks_url":"https://api.github.com/repos/moriyoshi/sftp/forks","keys_url":"https://api.github.com/repos/moriyoshi/sftp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moriyoshi/sftp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moriyoshi/sftp/teams","hooks_url":"https://api.github.com/repos/moriyoshi/sftp/hooks","issue_events_url":"https://api.github.com/repos/moriyoshi/sftp/issues/events{/number}","events_url":"https://api.github.com/repos/moriyoshi/sftp/events","assignees_url":"https://api.github.com/repos/moriyoshi/sftp/assignees{/user}","branches_url":"https://api.github.com/repos/moriyoshi/sftp/branches{/branch}","tags_url":"https://api.github.com/repos/moriyoshi/sftp/tags","blobs_url":"https://api.github.com/repos/moriyoshi/sftp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moriyoshi/sftp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moriyoshi/sftp/git/refs{/sha}","trees_url":"https://api.github.com/repos/moriyoshi/sftp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moriyoshi/sftp/statuses/{sha}","languages_url":"https://api.github.com/repos/moriyoshi/sftp/languages","stargazers_url":"https://api.github.com/repos/moriyoshi/sftp/stargazers","contributors_url":"https://api.github.com/repos/moriyoshi/sftp/contributors","subscribers_url":"https://api.github.com/repos/moriyoshi/sftp/subscribers","subscription_url":"https://api.github.com/repos/moriyoshi/sftp/subscription","commits_url":"https://api.github.com/repos/moriyoshi/sftp/commits{/sha}","git_commits_url":"https://api.github.com/repos/moriyoshi/sftp/git/commits{/sha}","comments_url":"https://api.github.com/repos/moriyoshi/sftp/comments{/number}","issue_comment_url":"https://api.github.com/repos/moriyoshi/sftp/issues/comments{/number}","contents_url":"https://api.github.com/repos/moriyoshi/sftp/contents/{+path}","compare_url":"https://api.github.com/repos/moriyoshi/sftp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moriyoshi/sftp/merges","archive_url":"https://api.github.com/repos/moriyoshi/sftp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moriyoshi/sftp/downloads","issues_url":"https://api.github.com/repos/moriyoshi/sftp/issues{/number}","pulls_url":"https://api.github.com/repos/moriyoshi/sftp/pulls{/number}","milestones_url":"https://api.github.com/repos/moriyoshi/sftp/milestones{/number}","notifications_url":"https://api.github.com/repos/moriyoshi/sftp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moriyoshi/sftp/labels{/name}","releases_url":"https://api.github.com/repos/moriyoshi/sftp/releases{/id}","deployments_url":"https://api.github.com/repos/moriyoshi/sftp/deployments","created_at":"2018-07-18T17:22:07Z","updated_at":"2018-07-18T17:22:09Z","pushed_at":"2018-07-19T10:38:24Z","git_url":"git://github.com/moriyoshi/sftp.git","ssh_url":"git@github.com:moriyoshi/sftp.git","clone_url":"https://github.com/moriyoshi/sftp.git","svn_url":"https://github.com/moriyoshi/sftp","homepage":null,"size":1981,"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":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause","node_id":"MDc6TGljZW5zZTQ="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pkg:master","ref":"master","sha":"57673e38ea946592a59c26592b7e6fbda646975b","user":{"login":"pkg","id":5497984,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0OTc5ODQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5497984?v=4","gravatar_id":"","url":"https://api.github.com/users/pkg","html_url":"https://github.com/pkg","followers_url":"https://api.github.com/users/pkg/followers","following_url":"https://api.github.com/users/pkg/following{/other_user}","gists_url":"https://api.github.com/users/pkg/gists{/gist_id}","starred_url":"https://api.github.com/users/pkg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkg/subscriptions","organizations_url":"https://api.github.com/users/pkg/orgs","repos_url":"https://api.github.com/users/pkg/repos","events_url":"https://api.github.com/users/pkg/events{/privacy}","received_events_url":"https://api.github.com/users/pkg/received_events","type":"Organization","site_admin":false},"repo":{"id":14132192,"node_id":"MDEwOlJlcG9zaXRvcnkxNDEzMjE5Mg==","name":"sftp","full_name":"pkg/sftp","owner":{"login":"pkg","id":5497984,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0OTc5ODQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5497984?v=4","gravatar_id":"","url":"https://api.github.com/users/pkg","html_url":"https://github.com/pkg","followers_url":"https://api.github.com/users/pkg/followers","following_url":"https://api.github.com/users/pkg/following{/other_user}","gists_url":"https://api.github.com/users/pkg/gists{/gist_id}","starred_url":"https://api.github.com/users/pkg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkg/subscriptions","organizations_url":"https://api.github.com/users/pkg/orgs","repos_url":"https://api.github.com/users/pkg/repos","events_url":"https://api.github.com/users/pkg/events{/privacy}","received_events_url":"https://api.github.com/users/pkg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pkg/sftp","description":"SFTP support for the go.crypto/ssh package","fork":false,"url":"https://api.github.com/repos/pkg/sftp","forks_url":"https://api.github.com/repos/pkg/sftp/forks","keys_url":"https://api.github.com/repos/pkg/sftp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pkg/sftp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pkg/sftp/teams","hooks_url":"https://api.github.com/repos/pkg/sftp/hooks","issue_events_url":"https://api.github.com/repos/pkg/sftp/issues/events{/number}","events_url":"https://api.github.com/repos/pkg/sftp/events","assignees_url":"https://api.github.com/repos/pkg/sftp/assignees{/user}","branches_url":"https://api.github.com/repos/pkg/sftp/branches{/branch}","tags_url":"https://api.github.com/repos/pkg/sftp/tags","blobs_url":"https://api.github.com/repos/pkg/sftp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pkg/sftp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pkg/sftp/git/refs{/sha}","trees_url":"https://api.github.com/repos/pkg/sftp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pkg/sftp/statuses/{sha}","languages_url":"https://api.github.com/repos/pkg/sftp/languages","stargazers_url":"https://api.github.com/repos/pkg/sftp/stargazers","contributors_url":"https://api.github.com/repos/pkg/sftp/contributors","subscribers_url":"https://api.github.com/repos/pkg/sftp/subscribers","subscription_url":"https://api.github.com/repos/pkg/sftp/subscription","commits_url":"https://api.github.com/repos/pkg/sftp/commits{/sha}","git_commits_url":"https://api.github.com/repos/pkg/sftp/git/commits{/sha}","comments_url":"https://api.github.com/repos/pkg/sftp/comments{/number}","issue_comment_url":"https://api.github.com/repos/pkg/sftp/issues/comments{/number}","contents_url":"https://api.github.com/repos/pkg/sftp/contents/{+path}","compare_url":"https://api.github.com/repos/pkg/sftp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pkg/sftp/merges","archive_url":"https://api.github.com/repos/pkg/sftp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pkg/sftp/downloads","issues_url":"https://api.github.com/repos/pkg/sftp/issues{/number}","pulls_url":"https://api.github.com/repos/pkg/sftp/pulls{/number}","milestones_url":"https://api.github.com/repos/pkg/sftp/milestones{/number}","notifications_url":"https://api.github.com/repos/pkg/sftp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pkg/sftp/labels{/name}","releases_url":"https://api.github.com/repos/pkg/sftp/releases{/id}","deployments_url":"https://api.github.com/repos/pkg/sftp/deployments","created_at":"2013-11-05T04:36:00Z","updated_at":"2018-07-18T19:53:15Z","pushed_at":"2018-07-19T10:44:11Z","git_url":"git://github.com/pkg/sftp.git","ssh_url":"git@github.com:pkg/sftp.git","clone_url":"https://github.com/pkg/sftp.git","svn_url":"https://github.com/pkg/sftp","homepage":null,"size":1978,"stargazers_count":534,"watchers_count":534,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":168,"mirror_url":null,"archived":false,"open_issues_count":16,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause","node_id":"MDc6TGljZW5zZTQ="},"forks":168,"open_issues":16,"watchers":534,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pkg/sftp/pulls/259"},"html":{"href":"https://github.com/pkg/sftp/pull/259"},"issue":{"href":"https://api.github.com/repos/pkg/sftp/issues/259"},"comments":{"href":"https://api.github.com/repos/pkg/sftp/issues/259/comments"},"review_comments":{"href":"https://api.github.com/repos/pkg/sftp/pulls/259/comments"},"review_comment":{"href":"https://api.github.com/repos/pkg/sftp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pkg/sftp/pulls/259/commits"},"statuses":{"href":"https://api.github.com/repos/pkg/sftp/statuses/068d4a685cb352cdadc84b2e40d577b5b43cc421"}},"author_association":"NONE"}}
{"actor":{"display_login":"houndci-bot"}}