🎨优化代码
This commit is contained in:
parent
97774b303f
commit
2cf8d40c80
@ -31,11 +31,11 @@ func NewWxHelper(host string, port uint) WxHelper {
|
|||||||
// @param uri
|
// @param uri
|
||||||
// @return string
|
// @return string
|
||||||
func (w *WxHelper) GetAddr(uri string) string {
|
func (w *WxHelper) GetAddr(uri string) string {
|
||||||
if !strings.HasPrefix(w.Host, "http") && !strings.HasPrefix(w.Host, "https://") {
|
if !strings.HasPrefix(w.host, "http") && !strings.HasPrefix(w.host, "https://") {
|
||||||
w.Host = fmt.Sprintf("http://%s", w.Host)
|
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
|
// SetHook
|
||||||
|
Loading…
Reference in New Issue
Block a user