Download MindMax database using license key
package main
import (
"fmt"
"io/ioutil"
"os"
"github.com/loafoe/mmdb"
)
func main() {
file, err := ioutil.TempFile("", "*.mmdb")
if err != nil {
fmt.Printf("%v\n", err)
return
}
resp, err := mmdb.Download(file.Name(), os.Getenv("LICENSE_KEY"))
if err != nil {
fmt.Printf("%v %v\n", resp, err)
}
fmt.Printf("Done: %s\n", file.Name())
}
License is MIT