From d6ad936901dc08abb10f1e2a00c9aeea98a3b1b2 Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Fri, 1 Aug 2025 15:03:40 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=A2=9E=E5=8A=A0=E5=8C=BA=E5=88=86=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bgptools/pop.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bgptools/pop.go b/bgptools/pop.go index 0f0bbc9..2c33e8e 100644 --- a/bgptools/pop.go +++ b/bgptools/pop.go @@ -11,6 +11,7 @@ import ( "github.com/google/uuid" "github.com/imroc/req/v3" "github.com/oneclickvirt/backtrace/model" + "github.com/oneclickvirt/defaultset" ) type ASCard struct { @@ -292,9 +293,12 @@ func GetPoPInfo(ip string) (*PoPResult, error) { var line1, line2, line3 []string for _, u := range batch { abbr := getISPAbbr(u.ASN, u.Name) - line1 = append(line1, center("AS"+u.ASN)) - line2 = append(line2, center(abbr)) - line3 = append(line3, center(u.Type)) + asStr := center("AS" + u.ASN) + abbrStr := center(abbr) + typeStr := center(u.Type) + line1 = append(line1, defaultset.White(asStr)) + line2 = append(line2, defaultset.DarkGreen(abbrStr)) + line3 = append(line3, defaultset.Blue(typeStr)) } result.WriteString(strings.Join(line1, "")) result.WriteString("\n")