{"action":"created","issue":{"url":"https://api.github.com/repos/gotk3/gotk3/issues/243","repository_url":"https://api.github.com/repos/gotk3/gotk3","labels_url":"https://api.github.com/repos/gotk3/gotk3/issues/243/labels{/name}","comments_url":"https://api.github.com/repos/gotk3/gotk3/issues/243/comments","events_url":"https://api.github.com/repos/gotk3/gotk3/issues/243/events","html_url":"https://github.com/gotk3/gotk3/issues/243","id":296785708,"number":243,"title":"Implement Label.SetAttributes()","user":{"login":"ns-cweber","id":13964486,"avatar_url":"https://avatars2.githubusercontent.com/u/13964486?v=4","gravatar_id":"","url":"https://api.github.com/users/ns-cweber","html_url":"https://github.com/ns-cweber","followers_url":"https://api.github.com/users/ns-cweber/followers","following_url":"https://api.github.com/users/ns-cweber/following{/other_user}","gists_url":"https://api.github.com/users/ns-cweber/gists{/gist_id}","starred_url":"https://api.github.com/users/ns-cweber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ns-cweber/subscriptions","organizations_url":"https://api.github.com/users/ns-cweber/orgs","repos_url":"https://api.github.com/users/ns-cweber/repos","events_url":"https://api.github.com/users/ns-cweber/events{/privacy}","received_events_url":"https://api.github.com/users/ns-cweber/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-13T15:49:19Z","updated_at":"2018-02-13T23:04:17Z","closed_at":null,"author_association":"NONE","body":"Label.SetAttributes() is missing. This can probably be worked around by Label.SetMarkup()."},"comment":{"url":"https://api.github.com/repos/gotk3/gotk3/issues/comments/365435812","html_url":"https://github.com/gotk3/gotk3/issues/243#issuecomment-365435812","issue_url":"https://api.github.com/repos/gotk3/gotk3/issues/243","id":365435812,"user":{"login":"ns-cweber","id":13964486,"avatar_url":"https://avatars2.githubusercontent.com/u/13964486?v=4","gravatar_id":"","url":"https://api.github.com/users/ns-cweber","html_url":"https://github.com/ns-cweber","followers_url":"https://api.github.com/users/ns-cweber/followers","following_url":"https://api.github.com/users/ns-cweber/following{/other_user}","gists_url":"https://api.github.com/users/ns-cweber/gists{/gist_id}","starred_url":"https://api.github.com/users/ns-cweber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ns-cweber/subscriptions","organizations_url":"https://api.github.com/users/ns-cweber/orgs","repos_url":"https://api.github.com/users/ns-cweber/repos","events_url":"https://api.github.com/users/ns-cweber/events{/privacy}","received_events_url":"https://api.github.com/users/ns-cweber/received_events","type":"User","site_admin":false},"created_at":"2018-02-13T23:04:17Z","updated_at":"2018-02-13T23:04:17Z","author_association":"NONE","body":"Implementing this seems straightforward, but testing it seems less so. In particular, the test case should probably be \"put some attrs into SetAttributes() and make sure the same are returned by GetAttributes()\"; however, reading the `*pango.AttrList` returned by `GetAttributes()` seems to require `pango_attr_list_get_iterator()` which requires that the `AttrList` is not modified until the iterator is freed.\r\n\r\nThis pretty much precludes `runtime.SetFinalizer()` for freeing the iterator; we would probably need to give the iterator a `Close()` method or some such, but we would still probably want to panic explicitly if the user modifies the `AttrList` before `Close()` is called (as opposed to whatever unspecified behavior results from modifying the list before freeing the iterator). At least this approach seems more Go-idiomatic.\r\n\r\nAnyway, I wanted feedback about this approach before I went about implementing any particular thing. Specifically, is there already a pattern for this sort of scenario?"}}
{"actor":{"display_login":"ns-cweber"}}