Move all directory related functionality into paths utils
As per suggestion by @willscott in: https://github.com/OpenObservatory/gooni/pull/9#discussion_r176760264
This commit is contained in:
parent
79c940022b
commit
cffb9ea74c
4 changed files with 54 additions and 31 deletions
|
|
@ -36,11 +36,6 @@ var legacyGeoipFiles = map[string]string{
|
|||
"GeoIP.dat": "http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz",
|
||||
}
|
||||
|
||||
// GeoIPDir returns the geoip data dir for the given OONI Home
|
||||
func GeoIPDir(home string) string {
|
||||
return filepath.Join(home, "geoip")
|
||||
}
|
||||
|
||||
// Download the file to a temporary location
|
||||
func downloadToTemp(url string) (string, error) {
|
||||
out, err := ioutil.TempFile(os.TempDir(), "maxmind")
|
||||
|
|
|
|||
Loading…
Reference in a new issue