Updates to allow for enhanced debugging.

Added structs for whois calls.

Added ability to write WhoIs to file.

Added structured output for Whois Records.

Added String Method for WhoIsRecord and WhoIsHistory Records.
This commit is contained in:
Evan Hosinski
2025-05-16 15:33:43 -04:00
parent 65c4ea6a15
commit 8246253738
2 changed files with 125 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
package debug
import (
"fmt"
"github.com/fatih/color"
)
func PrintError(err error) {
errLine := fmt.Sprintf("[DEBUG-ERROR] %s", err)
fmt.Println(color.RedString(errLine))
}
func PrintJson(json string) {
jsonLine := fmt.Sprintf("[DEBUG-JSON] %s", json)
fmt.Print(color.GreenString(jsonLine))
}
func PrintInfo(info string) {
infoLine := fmt.Sprintf("[DEBUG-INFO] %s", info)
fmt.Println(color.BlueString(infoLine))
}