Skip to content

Commit 2e9428c

Browse files
committed
fix:ftv6 color mode some bugs
1 parent 052fe2d commit 2e9428c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fast_trace/fast_trace ipv6.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package fastTrace
22

33
import (
44
"fmt"
5+
"github.com/fatih/color"
56
"github.com/nxtrace/NTrace-core/ipgeo"
67
"github.com/nxtrace/NTrace-core/printer"
78
"github.com/nxtrace/NTrace-core/trace"
@@ -16,7 +17,7 @@ import (
1617
//var pFastTracer ParamsFastTrace
1718

1819
func (f *FastTracer) tracert_v6(location string, ispCollection ISPCollection) {
19-
fmt.Printf("%s『%s %s 』%s\n", printer.YELLOW_PREFIX, location, ispCollection.ISPName, printer.RESET_PREFIX)
20+
fmt.Fprintf(color.Output, "%s\n", color.New(color.FgYellow, color.Bold).Sprintf("『%s %s 』", location, ispCollection.ISPName))
2021
fmt.Printf("traceroute to %s, %d hops max, %d byte packets\n", ispCollection.IPv6, f.ParamsFastTrace.MaxHops, f.ParamsFastTrace.PktSize)
2122

2223
ip, err := util.DomainLookUp(ispCollection.IPv6, "6", "", true)

0 commit comments

Comments
 (0)