Skip to content

Commit

Permalink
update: 整理
Browse files Browse the repository at this point in the history
  • Loading branch information
sjlleo committed May 14, 2022
1 parent 70305ca commit 6792baf
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions util/printer/tableprinter.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,16 @@ func tableDataGenerator(v2 methods.TracerouteHop, rdnsenable bool) *rowData {
}

// TODO: 判断 err 返回,并且在CLI终端提示错误
if dataOrigin == "LeoMoeAPI" {
switch dataOrigin {
case "LeoMoeAPI":
iPGeoData, err = ipgeo.LeoIP(ipStr)
} else if dataOrigin == "IP.SB" {
case "IP.SB":
iPGeoData, err = ipgeo.IPSB(ipStr)
} else if dataOrigin == "IPInfo" {
case "IPInfo":
iPGeoData, err = ipgeo.IPInfo(ipStr)
} else if dataOrigin == "IPInsight" {
case "IPInsight":
iPGeoData, err = ipgeo.IPInSight(ipStr)
} else {
default:
iPGeoData, err = ipgeo.LeoIP(ipStr)
}

Expand Down

0 comments on commit 6792baf

Please sign in to comment.