🎨优化代码
This commit is contained in:
parent
97774b303f
commit
2cf8d40c80
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user