{"action":"created","issue":{"url":"https://api.github.com/repos/ahmetalpbalkan/go-linq/issues/43","repository_url":"https://api.github.com/repos/ahmetalpbalkan/go-linq","labels_url":"https://api.github.com/repos/ahmetalpbalkan/go-linq/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/ahmetalpbalkan/go-linq/issues/43/comments","events_url":"https://api.github.com/repos/ahmetalpbalkan/go-linq/issues/43/events","html_url":"https://github.com/ahmetalpbalkan/go-linq/issues/43","id":192494567,"number":43,"title":"ToSlice dose not re-empty the dist slice","user":{"login":"aisk","id":699636,"avatar_url":"https://avatars.githubusercontent.com/u/699636?v=3","gravatar_id":"","url":"https://api.github.com/users/aisk","html_url":"https://github.com/aisk","followers_url":"https://api.github.com/users/aisk/followers","following_url":"https://api.github.com/users/aisk/following{/other_user}","gists_url":"https://api.github.com/users/aisk/gists{/gist_id}","starred_url":"https://api.github.com/users/aisk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aisk/subscriptions","organizations_url":"https://api.github.com/users/aisk/orgs","repos_url":"https://api.github.com/users/aisk/repos","events_url":"https://api.github.com/users/aisk/events{/privacy}","received_events_url":"https://api.github.com/users/aisk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-11-30T07:30:02Z","updated_at":"2016-12-05T08:41:26Z","closed_at":"2016-12-05T07:33:38Z","body":"Codes:\r\n\r\n```go\r\nfunc main() {\r\n\tl := []string{\"foo\", \"bar\", \"baz\"}\r\n\tlinq.From(l).ToSlice(&l)\r\n\tfmt.Println(l)\r\n}\r\n```\r\n\r\nResult:\r\n\r\n```\r\n[foo bar baz foo bar baz]\r\n```\r\n\r\ngo-linq version:\r\n\r\n```\r\n- name: github.com/ahmetalpbalkan/go-linq\r\n  version: 8985ec99e11a8bff7eb19dd0a0b2187770dab23a\r\n```\r\n\r\nI don't know whether this is a bug or a feature, but if this is a feature, I think it's better to have this behavior documented on `ToSlice`'s API doc."},"comment":{"url":"https://api.github.com/repos/ahmetalpbalkan/go-linq/issues/comments/264796100","html_url":"https://github.com/ahmetalpbalkan/go-linq/issues/43#issuecomment-264796100","issue_url":"https://api.github.com/repos/ahmetalpbalkan/go-linq/issues/43","id":264796100,"user":{"login":"kalaninja","id":18083464,"avatar_url":"https://avatars.githubusercontent.com/u/18083464?v=3","gravatar_id":"","url":"https://api.github.com/users/kalaninja","html_url":"https://github.com/kalaninja","followers_url":"https://api.github.com/users/kalaninja/followers","following_url":"https://api.github.com/users/kalaninja/following{/other_user}","gists_url":"https://api.github.com/users/kalaninja/gists{/gist_id}","starred_url":"https://api.github.com/users/kalaninja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalaninja/subscriptions","organizations_url":"https://api.github.com/users/kalaninja/orgs","repos_url":"https://api.github.com/users/kalaninja/repos","events_url":"https://api.github.com/users/kalaninja/events{/privacy}","received_events_url":"https://api.github.com/users/kalaninja/received_events","type":"User","site_admin":false},"created_at":"2016-12-05T08:41:26Z","updated_at":"2016-12-05T08:41:26Z","body":"@aisk Yes, you have to use `ToSlice` function.\r\n```go\r\nresult := make([]string{}, 3)\r\nl := []string{\"foo\", \"bar\", \"baz\"}\r\nlinq.From(l).OrderBy(func(a interface{}) interface{}{\r\n  return true;\r\n}).ToSlice(&result)\r\n```\r\n"}}
{"actor":{"display_login":"kalaninja"}}