From d62f45cc10fb817af4e4155c91532d1811fecbb6 Mon Sep 17 00:00:00 2001 From: Matt Burchett Date: Mon, 14 Jan 2019 12:09:53 -0600 Subject: [PATCH] Removing resultstoJson --- pkg/resolver/resolver.go | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/pkg/resolver/resolver.go b/pkg/resolver/resolver.go index 366a088..5393ff2 100644 --- a/pkg/resolver/resolver.go +++ b/pkg/resolver/resolver.go @@ -1,14 +1,12 @@ package resolver import ( - "encoding/json" "errors" "fmt" "log" "strings" "git.linuxrocker.com/mattburchett/go_tab-magic/pkg/config" - "git.linuxrocker.com/mattburchett/go_tab-magic/pkg/model" "github.com/miekg/dns" ) @@ -72,26 +70,6 @@ func PerformZoneTransfer(config config.Config) []string { } } } - // fmt.Println(data) - // resultsToJSON(data) return data } - -func resultsToJSON(data []string) { - jsonData := make([][]byte, 0) - for _, i := range data { - splitStrings := strings.Split(i, " ") - hostname := splitStrings[0] - ip := splitStrings[1] - txt := splitStrings[2] - dns := &model.Results{IP: ip, Hostname: hostname, TXT: txt} - b, err := json.Marshal(dns) - if err != nil { - fmt.Println(err) - } - jsonData = append(jsonData, b) - - } - -}