From e8c45f9045399752c3a03dc090852b3db2fd1132 Mon Sep 17 00:00:00 2001 From: guzeng Date: Fri, 30 Jul 2021 15:24:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=8E=B7=E5=8F=96=E7=AB=99?= =?UTF-8?q?=E7=82=B9=E4=BF=A1=E6=81=AF=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client.siteinfo.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/client.siteinfo.go b/client.siteinfo.go index 71f97d8..987ce43 100644 --- a/client.siteinfo.go +++ b/client.siteinfo.go @@ -28,9 +28,17 @@ type SiteInfoRes struct { * 2021/06/24 * GZ */ -func GetSiteInfoByHost(master, host string, url ...string) (*SiteInfoRes, error) { +func GetSiteInfoByHost(host string, params ...string) (*SiteInfoRes, error) { - conn, err := rpc_server_conn(url...) + var url string = "" + var master string = "" + if len(params) > 1 { + master = params[1] + } + if len(params) > 0 { + url = params[0] + } + conn, err := rpc_server_conn(url) if err != nil { return nil, err }