diff --git a/client.go b/client.go index d8d2ad8..9bacce6 100644 --- a/client.go +++ b/client.go @@ -31,11 +31,11 @@ func NewWxHelper(host string, port uint) WxHelper { // @param uri // @return string func (w *WxHelper) GetAddr(uri string) string { - if !strings.HasPrefix(w.Host, "http") && !strings.HasPrefix(w.Host, "https://") { - w.Host = fmt.Sprintf("http://%s", w.Host) + if !strings.HasPrefix(w.host, "http") && !strings.HasPrefix(w.host, "https://") { + w.host = fmt.Sprintf("http://%s", w.host) } - return fmt.Sprintf("%s:%d%s", w.Host, w.Port, uri) + return fmt.Sprintf("%s:%d%s", w.host, w.port, uri) } // SetHook