mirror of
https://github.com/luxfi/zapdb.git
synced 2026-10-30 15:12:20 +00:00
Fixes #2067 **Description** This PR fixes an issue where Go's `append` returns `nil` when appending an empty slice to a nil slice. I added a check in `SafeCopy` to ensure we always return `[]byte{}` in this case, along with a new unit test. I also verified it using the test offered in the issue **Checklist** - [x] Code compiles correctly and linting passes locally - [ ] For all _code_ changes, an entry added to the `CHANGELOG.md` file describing and linking to this PR - [x] Tests added for new functionality, or regression tests for bug fixes added as applicable --------- Co-authored-by: Matthew McNeely <[email protected]>