From ff2e0e3761d0aba9b88626b8e2058a4f77e29417 Mon Sep 17 00:00:00 2001 From: phillip-stephens Date: Tue, 21 May 2024 20:41:31 -0700 Subject: [PATCH] addressed all todos --- cmd/cli.go | 2 +- pkg/zdns/lookup.go | 2 -- pkg/zdns/qa.go | 1 - pkg/zdns/util.go | 1 + 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cmd/cli.go b/cmd/cli.go index 03cde31b..d9080b32 100644 --- a/cmd/cli.go +++ b/cmd/cli.go @@ -44,7 +44,7 @@ type CLIConf struct { NameServersString string LocalAddrString string LocalIfaceString string - ConfigFilePath string // TODO Phillip - implement/ figure out what this is + ConfigFilePath string ClassString string UseNanoseconds bool ClientSubnetString string diff --git a/pkg/zdns/lookup.go b/pkg/zdns/lookup.go index 82f2ae65..4f6fd37e 100644 --- a/pkg/zdns/lookup.go +++ b/pkg/zdns/lookup.go @@ -279,8 +279,6 @@ func (r *Resolver) retryingLookup(q Question, nameServer string, recursive bool) } else { origTimeout = r.tcpClient.Timeout } - // TODO - Phillip it feels like bad practice to change the timeout value of the client without user input, should return an error/log msg and exit - // Leaving as a separate task so as not to refactor AND change functionality defer func() { // set timeout values back to original if r.udpClient != nil { diff --git a/pkg/zdns/qa.go b/pkg/zdns/qa.go index d18d0a7c..af9f07e4 100644 --- a/pkg/zdns/qa.go +++ b/pkg/zdns/qa.go @@ -46,7 +46,6 @@ type TraceStep struct { Try int `json:"try" groups:"trace"` } -// TODO Phillip - many of these fields aren't being used, we should consider removing them or populating them // Result contains all the metadata from a complete lookup, potentailly after following many CNAMEs/etc. type Result struct { AlteredName string `json:"altered_name,omitempty" groups:"short,normal,long,trace"` diff --git a/pkg/zdns/util.go b/pkg/zdns/util.go index fc84f603..059973a9 100644 --- a/pkg/zdns/util.go +++ b/pkg/zdns/util.go @@ -129,6 +129,7 @@ func VerifyAddress(ansType string, ip string) bool { return isIpv6 } // TODO Phillip - this seems like strange behavior. Maybe assert that ansType is either 'A' or 'AAAA'? + // I'll come back to this post-merge, it was like this in the original version. return !isIpv4 && !isIpv6 }