diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-01-12 15:50:35 -0700 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-01-12 15:50:35 -0700 |
commit | 47224c438732d021e5aef74af30c7fd5801621d2 (patch) | |
tree | 86c3ed57636dc0794b61e6764c08ea5777bef072 /syscall_darwin.go | |
parent | Mock OS and File. (diff) | |
download | dedo-47224c438732d021e5aef74af30c7fd5801621d2.tar.gz dedo-47224c438732d021e5aef74af30c7fd5801621d2.tar.xz |
Mock syscall.
Diffstat (limited to 'syscall_darwin.go')
-rw-r--r-- | syscall_darwin.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/syscall_darwin.go b/syscall_darwin.go new file mode 100644 index 0000000..de34193 --- /dev/null +++ b/syscall_darwin.go @@ -0,0 +1,16 @@ +package bolt + +import ( + "syscall" +) + +type _syscall interface { + Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) +} + +type syssyscall struct{} + +func (o *syssyscall) Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { + // err = (EACCES, EBADF, EINVAL, ENODEV, ENOMEM, ENXIO, EOVERFLOW) + return syscall.Mmap(fd, offset, length, prot, flags) +} |