{"action":"opened","issue":{"url":"https://api.github.com/repos/microo8/mimir/issues/3","repository_url":"https://api.github.com/repos/microo8/mimir","labels_url":"https://api.github.com/repos/microo8/mimir/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/microo8/mimir/issues/3/comments","events_url":"https://api.github.com/repos/microo8/mimir/issues/3/events","html_url":"https://github.com/microo8/mimir/issues/3","id":181131672,"number":3,"title":"rand.Int() not the best way for the id.","user":{"login":"johnkl","id":4600547,"avatar_url":"https://avatars.githubusercontent.com/u/4600547?v=3","gravatar_id":"","url":"https://api.github.com/users/johnkl","html_url":"https://github.com/johnkl","followers_url":"https://api.github.com/users/johnkl/followers","following_url":"https://api.github.com/users/johnkl/following{/other_user}","gists_url":"https://api.github.com/users/johnkl/gists{/gist_id}","starred_url":"https://api.github.com/users/johnkl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnkl/subscriptions","organizations_url":"https://api.github.com/users/johnkl/orgs","repos_url":"https://api.github.com/users/johnkl/repos","events_url":"https://api.github.com/users/johnkl/events{/privacy}","received_events_url":"https://api.github.com/users/johnkl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-05T11:48:28Z","updated_at":"2016-10-05T11:48:28Z","closed_at":null,"body":"1. Collisions should not be allowed.\r\n2. ID range may be very large(In my current project I'm not sure that's enough uint64).\r\n\r\nI propose to use []byte as an identifier.\r\nYou can allow the user to select the number of bytes for the index.\r\nAnd a choice of two options:\r\n1. autoincrement (without affecting the user part of mimir)\r\nsomething like that:\r\n```\r\nfunc inc(b []byte) {\r\n\tfor j := 0; j < len(b); j++ {\r\n\t\tb[j]++\r\n\t\tif b[j] > 0 {\r\n\t\t\tbreak\r\n\t\t}\r\n\t}\r\n}\r\n```\r\n2. User-defined identifier in operations\r\nsomething like that:\r\n`persons.AddWithId([]byte{0,0,0,1}, person)\r\n`\r\nAnyway, rand.Int() not the best way for the identifier field in production.\r\n\r\nI would expect you to address this issue, because I greatly enjoyed mimir use in my new project.\r\n"}}
{"actor":{"display_login":"johnkl"}}