From 8e95b6565db9f90c690ea47b05605896eed948cf Mon Sep 17 00:00:00 2001 From: naiba Date: Mon, 22 Mar 2021 21:41:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=BC=BA=20IP=20=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=81=A5=E5=A3=AE=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/agent/monitor/myip.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/cmd/agent/monitor/myip.go b/cmd/agent/monitor/myip.go index 765bd5e..c46f376 100644 --- a/cmd/agent/monitor/myip.go +++ b/cmd/agent/monitor/myip.go @@ -4,7 +4,6 @@ import ( "encoding/json" "fmt" "io/ioutil" - "log" "net/http" "time" ) @@ -27,12 +26,6 @@ var ipv6Servers = []string{ var cachedIP, cachedCountry string func UpdateIP() { - go func() { - for { - log.Println(cachedIP, cachedCountry) - time.Sleep(time.Second) - } - }() for { ipv4 := fetchGeoIP(ipv4Servers) ipv6 := fetchGeoIP(ipv6Servers)