oschwald / maxminddb-golang

MaxMind DB Reader for Go
ISC License
615 stars 101 forks source link

Do not use unsafe on Google App Engine #10

Closed fnkr closed 9 years ago

fnkr commented 9 years ago

I cannot deploy to Google App Engine because this package uses unsafe. Is there some way to get rid of the unsafe package?

oschwald commented 9 years ago

This was added in #9 as it improves performance somewhat and is "safe". I didn't realize that Google App Engine removes unsafe. It also appears to remove some things from syscall, which we also use. Do you know if this would compile without the unsafe?

oschwald commented 9 years ago

It appears that there is an appengine build constraint. It should be fairly easy to modify the package so that it uses a version without unsafe on Google App Engine.

oschwald commented 9 years ago

This should be fixed. Please let me know if you get any other errors.

fnkr commented 9 years ago

unsafe error is fixed now, but now it brings almost the same message but with import syscall in reader_unix.go.

go-app-builder: Failed parsing input: parser: bad import "syscall" in github.com/oschwald/maxminddb-golang/reader_unix.go
oschwald commented 9 years ago

Thanks. I opened #11 for this issue. We probably just need to remove mmap support when compiled on GAE.