This commit is contained in:
mats committed 2026-06-28 17:52:49 +02:00
1 parent e706f7d907
commit 21bcb63440
42 files changed
+5903

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
//go:build !unix
// Non-unix fallback for SnapshotReader: ReadFile into a []byte. Functionally
// identical to the unix mmap path — same reader code, same lookups — just
// pays the full resident-set cost at Open. Production mmap-on-Linux/Darwin;
// this exists for windows / plan9 / wasm builds.
package catalog
import "os"
func loadSnapshotBytes(path string) (data []byte, closer func() error, err error) {
data, err = os.ReadFile(path)
if err != nil {
return nil, nil, err
}
return data, func() error { return nil }, nil
}