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:
@@ -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))
|
||||
}
|
||||
Reference in New Issue
Block a user