fix: formatURL name

This commit is contained in:
ourines committed 2023-10-17 17:05:36 +08:00
1 parent cf7bd13db3
commit 3e9c3ed3fc
1 file changed
+4 -4
+4 -4
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
}