Skip to content

Commit

Permalink
删除一些没必要的赋值
Browse files Browse the repository at this point in the history
  • Loading branch information
tsosunchia committed Dec 8, 2023
1 parent af5259e commit 156f891
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ func Excute() {
//
//go func() {
// defer wg.Done()
err = nil
if *udp {
if *ipv6Only {
fmt.Println("[Info] IPv6 UDP Traceroute is not supported right now.")
Expand Down
2 changes: 1 addition & 1 deletion trace/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func (h *Hop) fetchIPData(c Config) (err error) {
if !c.AlwaysWaitRDNS {
select {
case <-fetchDoneChan:
// When fetch done signal recieved, stop waiting PTR record
// When fetch done signal received, stop waiting PTR record
case ptr := <-rDNSChan:
// process result
if err == nil && len(ptr) > 0 {
Expand Down
2 changes: 1 addition & 1 deletion tracemap/tracemap.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

func GetMapUrl(r string) (string, error) {
host, port := util.GetHostAndPort()
fastIp := "origin-fallback.nxtrace.org"
var fastIp string
// 如果 host 是一个 IP 使用默认域名
if valid := net.ParseIP(host); valid != nil {
fastIp = host
Expand Down
2 changes: 1 addition & 1 deletion util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func GetProxy() *url.URL {
}

func GetPowProvider() string {
var powProvider = ""
var powProvider string
if PowProviderParam == "" {
powProvider = GetenvDefault("NEXTTRACE_POWPROVIDER", "api.nxtrace.org")
} else {
Expand Down

0 comments on commit 156f891

Please sign in to comment.