Skip to content

Commit 83f644c

Browse files
authored
Fix ping with domain not working issue (#28) (#29)
1 parent 84598f9 commit 83f644c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ var rootCmd = cobra.Command{
118118
}
119119

120120
parseHost, _ := ping.FormatIP(host)
121+
if len(parseHost) <= 0 {
122+
parseHost = host
123+
}
121124
target := ping.Target{
122125
Timeout: timeoutDuration,
123126
Interval: intervalDuration,

0 commit comments

Comments
 (0)