From 3b8e055690b1b5784ba880c4076a60070f1b1488 Mon Sep 17 00:00:00 2001 From: Alextopher Date: Wed, 27 Jul 2022 19:37:38 -0400 Subject: [PATCH] remove the license key I looked --- go.mod | 2 +- update_test.go | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 277a71f..f8327f2 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/COSI-Lab/Mirror/geoip +module github.com/COSI-Lab/geoip go 1.18 diff --git a/update_test.go b/update_test.go index c65bdcf..923b7f7 100644 --- a/update_test.go +++ b/update_test.go @@ -44,6 +44,7 @@ func TestDownloadDatabase(t *testing.T) { t.Error("MAXMIND_LICENSE_KEY environment variable not set") return } + // Prepare the checksum sha256, err := downloadHash(licenseKey) if err != nil { @@ -65,7 +66,11 @@ func TestDownloadDatabase(t *testing.T) { func TestLookups(t *testing.T) { // Get the license key through environment variables - licenseKey := "O1MFhnxCY9aKUyio" + licenseKey := os.Getenv("MAXMIND_LICENSE_KEY") + if licenseKey == "" { + t.Error("MAXMIND_LICENSE_KEY environment variable not set") + return + } geoip, err := NewGeoIPHandler(licenseKey) if err != nil {