1- //go:build !appengine && !plan9
2- // +build !appengine,!plan9
1+ //go:build !appengine && !plan9 && !js && !wasip1
2+ // +build !appengine,!plan9,!js,!wasip1
33
44package maxminddb
55
@@ -9,10 +9,10 @@ import (
99)
1010
1111// Open takes a string path to a MaxMind DB file and returns a Reader
12- // structure or an error. The database file is opened using a memory map,
13- // except on Google App Engine where mmap is not supported; there the database
14- // is loaded into memory. Use the Close method on the Reader object to return
15- // the resources to the system.
12+ // structure or an error. The database file is opened using a memory map
13+ // on supported platforms. On platforms without memory map support, such
14+ // as WebAssembly or Google App Engine, the database is loaded into memory.
15+ // Use the Close method on the Reader object to return the resources to the system.
1616func Open (file string ) (* Reader , error ) {
1717 mapFile , err := os .Open (file )
1818 if err != nil {
@@ -51,9 +51,7 @@ func Open(file string) (*Reader, error) {
5151 return reader , nil
5252}
5353
54- // Close unmaps the database file from virtual memory and returns the
55- // resources to the system. If called on a Reader opened using FromBytes
56- // or Open on Google App Engine, this method does nothing.
54+ // Close returns the resources used by the database to the system.
5755func (r * Reader ) Close () error {
5856 var err error
5957 if r .hasMappedFile {
0 commit comments