{"action":"created","issue":{"url":"https://api.github.com/repos/cznic/kv/issues/28","labels_url":"https://api.github.com/repos/cznic/kv/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/cznic/kv/issues/28/comments","events_url":"https://api.github.com/repos/cznic/kv/issues/28/events","html_url":"https://github.com/cznic/kv/issues/28","id":112972198,"number":28,"title":"How to tell missing record from empty one?","user":{"login":"pmezard","id":1430779,"avatar_url":"https://avatars.githubusercontent.com/u/1430779?v=3","gravatar_id":"","url":"https://api.github.com/users/pmezard","html_url":"https://github.com/pmezard","followers_url":"https://api.github.com/users/pmezard/followers","following_url":"https://api.github.com/users/pmezard/following{/other_user}","gists_url":"https://api.github.com/users/pmezard/gists{/gist_id}","starred_url":"https://api.github.com/users/pmezard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmezard/subscriptions","organizations_url":"https://api.github.com/users/pmezard/orgs","repos_url":"https://api.github.com/users/pmezard/repos","events_url":"https://api.github.com/users/pmezard/events{/privacy}","received_events_url":"https://api.github.com/users/pmezard/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-23T08:09:30Z","updated_at":"2015-10-24T11:51:02Z","closed_at":"2015-10-24T11:51:02Z","body":"Hello,\r\n\r\nWhen calling Get() on a missing key it always return nil data. The same thing happens with records with empty value. How do you tell one from another?\r\n\r\nHere is a test describing the problem:\r\n\r\n  https://github.com/pmezard/kv/commit/28a08e25d5e83f03af9b73609ed94435ae941954\r\n\r\nThe last two checks currently fail. The empty record can be seeked so it actually exists.\r\n\r\nWhat do you think of changing Get() so that:\r\n- missing records always return nil\r\n- empty records return an empty slice\r\n(This is boltdb behaviour).\r\n\r\nI can try to make a PR on lldb if the change is ok for you."},"comment":{"url":"https://api.github.com/repos/cznic/kv/issues/comments/150801934","html_url":"https://github.com/cznic/kv/issues/28#issuecomment-150801934","issue_url":"https://api.github.com/repos/cznic/kv/issues/28","id":150801934,"user":{"login":"pmezard","id":1430779,"avatar_url":"https://avatars.githubusercontent.com/u/1430779?v=3","gravatar_id":"","url":"https://api.github.com/users/pmezard","html_url":"https://github.com/pmezard","followers_url":"https://api.github.com/users/pmezard/followers","following_url":"https://api.github.com/users/pmezard/following{/other_user}","gists_url":"https://api.github.com/users/pmezard/gists{/gist_id}","starred_url":"https://api.github.com/users/pmezard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmezard/subscriptions","organizations_url":"https://api.github.com/users/pmezard/orgs","repos_url":"https://api.github.com/users/pmezard/repos","events_url":"https://api.github.com/users/pmezard/events{/privacy}","received_events_url":"https://api.github.com/users/pmezard/received_events","type":"User","site_admin":false},"created_at":"2015-10-24T11:51:02Z","updated_at":"2015-10-24T11:51:02Z","body":"Fixed by https://github.com/cznic/exp/pull/9"}}