{"action":"closed","issue":{"url":"https://api.github.com/repos/golang/tour/issues/52","repository_url":"https://api.github.com/repos/golang/tour","labels_url":"https://api.github.com/repos/golang/tour/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/golang/tour/issues/52/comments","events_url":"https://api.github.com/repos/golang/tour/issues/52/events","html_url":"https://github.com/golang/tour/issues/52","id":167238218,"number":52,"title":"tour: Output doesn't work","user":{"login":"meownoid","id":20129246,"avatar_url":"https://avatars.githubusercontent.com/u/20129246?v=3","gravatar_id":"","url":"https://api.github.com/users/meownoid","html_url":"https://github.com/meownoid","followers_url":"https://api.github.com/users/meownoid/followers","following_url":"https://api.github.com/users/meownoid/following{/other_user}","gists_url":"https://api.github.com/users/meownoid/gists{/gist_id}","starred_url":"https://api.github.com/users/meownoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meownoid/subscriptions","organizations_url":"https://api.github.com/users/meownoid/orgs","repos_url":"https://api.github.com/users/meownoid/repos","events_url":"https://api.github.com/users/meownoid/events{/privacy}","received_events_url":"https://api.github.com/users/meownoid/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-24T15:18:11Z","updated_at":"2016-07-25T03:28:38Z","closed_at":"2016-07-25T03:28:38Z","body":"Context: https://tour.golang.org/methods/23\r\n\r\nI've solved methods/23 like this:\r\n```go\r\nfunc (old_reader rot13Reader) Read(b []byte) (int, error) {\r\n\tconst LEN int = 1024\r\n\ttmp_bytes := make([]byte, LEN)\r\n\told_len, err := old_reader.r.Read(tmp_bytes)\r\n\tif err == nil {\r\n\t\ttmp_bytes = tmp_bytes[:old_len]\r\n\t\trot13(tmp_bytes)\r\n\t\treturn len(tmp_bytes), nil\r\n\t} else {\r\n\t\treturn 0, err\r\n\t}\r\n}\r\n\r\nfunc main() {\r\n\ts := strings.NewReader(\"Lbh penpxrq gur pbqr!\")\r\n\tr := rot13Reader{s}\r\n\tio.Copy(os.Stdout, &r)\r\n}\r\n```\r\n\r\nwhere `rot13` is correct, but I can't see any output, process just exits. Debug output just before `return len(tmp_bytes), nil` shows correct string."}}
{"actor":{"display_login":"adg"}}