| 1 | //go:build appengine || plan9 || js || wasip1 || wasi |
| 2 | |
| 3 | package maxminddb |
| 4 | |
| 5 | import ( |
| 6 | "errors" |
| 7 | ) |
| 8 | |
| 9 | type mmapUnsupportedError struct{} |
| 10 | |
| 11 | func (mmapUnsupportedError) Error() string { |
| 12 | return "mmap is not supported on this platform" |
| 13 | } |
| 14 | |
| 15 | func (mmapUnsupportedError) Is(target error) bool { |
| 16 | return target == errors.ErrUnsupported |
| 17 | } |
| 18 | |
| 19 | func mmap(_, _ int) (data []byte, err error) { |
| 20 | return nil, mmapUnsupportedError{} |
| 21 | } |
| 22 | |
| 23 | func munmap(_ []byte) (err error) { |
| 24 | return mmapUnsupportedError{} |
| 25 | } |