mmdb

package module
v0.0.0-...-6c8d756 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2021 License: MIT Imports: 7 Imported by: 0

README

mmdb

Download MindMax database using license key

usage

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

License is MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(filePath, licenseKey string, client ...*http.Client) (*http.Response, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL