Function with cyclomatic complexity higher than threshold GO-R1005
Anti-pattern
Minor
1 occurrence in this check
func SetStoreLimit has a cyclomatic complexity of 16 with "high" risk
304// @Failure  400  {string}  string  "The input is invalid."
305// @Failure  500  {string}  string  "PD server failed to proceed the request."
306// @Router   /store/{id}/limit [post]
307func (h *storeHandler) SetStoreLimit(w http.ResponseWriter, r *http.Request) {308	rc := getCluster(r)
309	if version := rc.GetScheduleConfig().StoreLimitVersion; version != storelimit.VersionV1 {
310		h.rd.JSON(w, http.StatusBadRequest, fmt.Sprintf("current store limit version:%s not support set limit", version))