Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

Commit

Permalink
fix: ipv6地址分割问题
Browse files Browse the repository at this point in the history
  • Loading branch information
tsosunchia committed Feb 10, 2023
1 parent 17fdd5f commit 267171f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ func flagApply() string {
if strings.Contains(target, "]") {
target = strings.Split(strings.Split(target, "]")[0], "[")[1]
} else if strings.Contains(target, ":") {
target = strings.Split(target, ":")[0]
if strings.Count(target, ":") == 1 {
target = strings.Split(target, ":")[0]
}
}

return target
Expand Down

0 comments on commit 267171f

Please sign in to comment.