From 91ebceb3a8b767fbb8a80669a954732f98bb654d Mon Sep 17 00:00:00 2001 From: Lajos Koszti Date: Thu, 6 May 2021 09:26:50 +0200 Subject: [PATCH 1/2] Remove unused debug code I was meauring some object memory footprint before, and just forgot to remove it --- main.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/main.go b/main.go index da2d384..8954f37 100644 --- a/main.go +++ b/main.go @@ -8,7 +8,6 @@ import ( "os" "strings" "sync" - "unsafe" ) func getToken(str, delimiter, out string) string { @@ -150,7 +149,7 @@ func negate(f func(string) bool) func(string) bool { } } -func getLines(reader io.Reader) []string { +func readLines(reader io.Reader) []string { scanner := bufio.NewScanner(reader) scanner.Split(bufio.ScanLines) var text []string @@ -168,11 +167,11 @@ func getProvidersFromFile(fn string) ([]string, error) { } defer file.Close() - return getLines(file), nil + return readLines(file), nil } func getProvidersFromStdin() ([]string, error) { - text := getLines(os.Stdin) + text := readLines(os.Stdin) return text, nil } @@ -232,12 +231,10 @@ func main() { var providers []DNSBLProvider - s := 0 for _, item := range list { provider := GeneralDNSBLProvider{ URL: item, } - s += int(unsafe.Sizeof(provider)) providers = append(providers, provider) } From 11fe62ff534f2915b272ca9daa3b114a864cb381 Mon Sep 17 00:00:00 2001 From: Lajos Koszti Date: Thu, 6 May 2021 09:28:28 +0200 Subject: [PATCH 2/2] v1.1.0