1
0
mirror of https://github.com/silenceper/wechat.git synced 2026-02-23 13:42:25 +08:00

fix: formatURL name

This commit is contained in:
ourines
2023-10-17 17:05:36 +08:00
parent cf7bd13db3
commit 3e9c3ed3fc

View File

@@ -116,7 +116,7 @@ func (r *Client) DepartmentList() ([]*Department, error) {
//
// @desc https://developer.work.weixin.qq.com/document/path/90208
func (r *Client) DepartmentListByID(departmentID int) ([]*Department, error) {
var formatUrl string
var formatURL string
// 获取accessToken
accessToken, err := r.GetAccessToken()
@@ -125,15 +125,15 @@ func (r *Client) DepartmentListByID(departmentID int) ([]*Department, error) {
}
if departmentID > 0 {
formatUrl =
formatURL =
fmt.Sprintf(departmentListByIDURL, accessToken, departmentID)
} else {
formatUrl =
formatURL =
fmt.Sprintf(departmentListURL, accessToken)
}
// 发起http请求
response, err := util.HTTPGet(formatUrl)
response, err := util.HTTPGet(formatURL)
if err != nil {
return nil, err
}