Potential issue in filepath.Join() function calls GO-W4001
Anti-pattern
Major
8 months ago2 years old
"/pd/api/v1/admin/persist-file" contains a path separator
1922		log.Warn("failed to replicate file", zap.String("name", name), zap.String("member", member.GetName()))
1923		return errs.ErrClientURLEmpty.FastGenByArgs()
1924	}
1925	url := clientUrls[0] + filepath.Join("/pd/api/v1/admin/persist-file", name)1926	req, _ := http.NewRequestWithContext(ctx, http.MethodPost, url, bytes.NewBuffer(data))
1927	req.Header.Set(apiutil.PDAllowFollowerHandleHeader, "true")
1928	res, err := s.httpClient.Do(req)