From 67c06bdf93e89fa5b76fc4cb6697c72416371e0f Mon Sep 17 00:00:00 2001 From: giaogiao Date: Fri, 28 Jul 2023 15:31:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88api=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index f4331ef..452884a 100644 --- a/main.go +++ b/main.go @@ -2,7 +2,7 @@ * @Author: giaogiao giaogiao * @Date: 2023-07-28 08:53:13 * @LastEditors: giaogiao giaogiao - * @LastEditTime: 2023-07-28 15:23:27 + * @LastEditTime: 2023-07-28 15:31:25 * @FilePath: \go\main.go * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -13,6 +13,7 @@ import ( "fmt" "hello/setup" "io/ioutil" + "net/http" "os" "strconv" "time" @@ -57,8 +58,8 @@ func text_url(remarks string, country string, port int) { // fmt.Print(errs) setup.CwLog().Errorf("start_testing country:%s,port:%d,error:%s", country, port, errs) setup.CwLog().Infof("start_switching_ip country:%s,port:%d", country, port) - // resp, err := http.Get("http://127.0.0.1:9049/v1/ips?num=1&country=" + country + "&state=all&city=all&zip=all&t=txt&port=" + strconv.Itoa(port) + "&isp=all&start=&end=") - // sugar.Infof("switch_ip_to_return resp:%s,err:%s", resp, err) + resp, err := http.Get("http://127.0.0.1:9049/v1/ips?num=1&country=" + country + "&state=all&city=all&zip=all&t=txt&port=" + strconv.Itoa(port) + "&isp=all&start=&end=") + setup.CwLog().Infof("switch_ip_to_return resp:%s,err:%s", resp, err) } setup.CwLog().Infof("requestToReturnTheResult resp:%s,body:%s", resp, body) setup.CwLog().Infof("the_current_port_is_fine port:%d", port)