more platform
This commit is contained in:
1 parent
8a71e32149
commit
2a66754f9e
27 files changed
+2435
-540
No files matched your search
@@ -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 projection
|
||||
|
||||
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
|
||||
}
|
||||
Reference in new issue
Block a user