diff --git a/cmd/root.go b/cmd/root.go index 47a8acd..b8c6b0d 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -64,7 +64,7 @@ Find document on: https://github.com/zu1k/nali if line == "quit" || line == "exit" { return } - fmt.Println(app.ReplaceInString(line)) + fmt.Println(app.ReplaceIPInString(app.ReplaceCDNInString(line))) } } else { app.ParseIPs(args) diff --git a/internal/app/parse.go b/internal/app/parse.go index 68cd81a..0f05f66 100644 --- a/internal/app/parse.go +++ b/internal/app/parse.go @@ -49,12 +49,12 @@ func ParseIPs(ips []string) { result := db1.Find(ip) fmt.Println(formatResult(ip, result)) } else { - fmt.Println(ReplaceInString(ip)) + fmt.Println(ReplaceIPInString(ip)) } } } -func ReplaceInString(str string) (result string) { +func ReplaceIPInString(str string) (result string) { db0 := db[0] var db1 ipdb.IPDB if len(db) > 1 {