mmap maps the given file into memory.
(file string)
| 419 | |
| 420 | // mmap maps the given file into memory. |
| 421 | func mmap(file string) mmapData { |
| 422 | f, err := os.Open(file) |
| 423 | if err != nil { |
| 424 | log.Fatal(err) |
| 425 | } |
| 426 | return mmapFile(f) |
| 427 | } |
| 428 | |
| 429 | // File returns the name of the index file to use. |
| 430 | // It is either $CSEARCHINDEX or $HOME/.csearchindex. |