Google code search used mmap and go back in the day:
Regular Expression Matching with a Trigram Index
or
How Google Code Search Worked
<a href="https://swtch.com/~rsc/regexp/regexp4.html" rel="nofollow">https://swtch.com/~rsc/regexp/regexp4.html</a><p><a href="https://github.com/google/codesearch/tree/master/index" rel="nofollow">https://github.com/google/codesearch/tree/master/index</a><p>I used mmap in a go project that had large (GByte) hash tables. Sidesteps any GC pauses and makes for very fast file loading.
Maybe also ask your specific questions over on Go-nuts [0] - Lots of knowledgable Go folk there (including a bunch of the Go devs), and most questions get answered pretty quickly. HTH<p>[0] <a href="https://groups.google.com/forum/#!forum/golang-nuts" rel="nofollow">https://groups.google.com/forum/#!forum/golang-nuts</a>