{"action":"opened","issue":{"url":"https://api.github.com/repos/jetbasrawi/go.geteventstore/issues/12","repository_url":"https://api.github.com/repos/jetbasrawi/go.geteventstore","labels_url":"https://api.github.com/repos/jetbasrawi/go.geteventstore/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/jetbasrawi/go.geteventstore/issues/12/comments","events_url":"https://api.github.com/repos/jetbasrawi/go.geteventstore/issues/12/events","html_url":"https://github.com/jetbasrawi/go.geteventstore/issues/12","id":352084419,"node_id":"MDU6SXNzdWUzNTIwODQ0MTk=","number":12,"title":"Next() does returns current event.","user":{"login":"bweston92","id":1764057,"node_id":"MDQ6VXNlcjE3NjQwNTc=","avatar_url":"https://avatars1.githubusercontent.com/u/1764057?v=4","gravatar_id":"","url":"https://api.github.com/users/bweston92","html_url":"https://github.com/bweston92","followers_url":"https://api.github.com/users/bweston92/followers","following_url":"https://api.github.com/users/bweston92/following{/other_user}","gists_url":"https://api.github.com/users/bweston92/gists{/gist_id}","starred_url":"https://api.github.com/users/bweston92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bweston92/subscriptions","organizations_url":"https://api.github.com/users/bweston92/orgs","repos_url":"https://api.github.com/users/bweston92/repos","events_url":"https://api.github.com/users/bweston92/events{/privacy}","received_events_url":"https://api.github.com/users/bweston92/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-20T10:56:02Z","updated_at":"2018-08-20T10:56:02Z","closed_at":null,"author_association":"NONE","body":"Here is my code, it pulls an event (which is a Click) and the next time it pulls the next event in the stream. However I get the same event back every time.\r\n\r\nI can only get it wokring by storing a local version and calling `NextVersion(r.version++)` every time.\r\n\r\nHere is my Next method which calls the stream readers next function.\r\n```\r\nfunc (r *Reader) Next() (*stream.Click, error) {\r\n\tr.lock.Lock()\r\n\tdefer r.lock.Unlock()\r\n\r\n\tif !r.client.Next() {\r\n\t\treturn nil, io.EOF\r\n\t}\r\n\r\n\tif err := r.client.Err(); err != nil {\r\n\t\tif _, ok := err.(*goes.ErrNoMoreEvents); ok {\r\n\t\t\treturn nil, io.EOF\r\n\t\t}\r\n\r\n\t\treturn nil, err\r\n\t}\r\n\r\n\to := &stream.Click{}\r\n\treturn o, r.client.Scan(&o, nil)\r\n}\r\n```"}}
{"actor":{"display_login":"bweston92"}}