CheckIndexIsExist 判断插件优先级是否存在
(httpResponse http.ResponseWriter, httpRequest *http.Request)
| 262 | |
| 263 | //CheckIndexIsExist 判断插件优先级是否存在 |
| 264 | func CheckIndexIsExist(httpResponse http.ResponseWriter, httpRequest *http.Request) { |
| 265 | |
| 266 | pluginPriority := httpRequest.PostFormValue("pluginPriority") |
| 267 | |
| 268 | index, err := strconv.Atoi(pluginPriority) |
| 269 | if err != nil { |
| 270 | controller.WriteError(httpResponse, |
| 271 | "210001", |
| 272 | "plugin", |
| 273 | "[ERROR]Illegal pluginPriority!", |
| 274 | err) |
| 275 | return |
| 276 | |
| 277 | } |
| 278 | flag, err := plugin.CheckIndexIsExist("", index) |
| 279 | if !flag { |
| 280 | |
| 281 | controller.WriteError(httpResponse, |
| 282 | "210011", |
| 283 | "plugin", |
| 284 | "[ERROR]Plugin pluginPriority does not exist!", |
| 285 | err) |
| 286 | return |
| 287 | |
| 288 | } |
| 289 | controller.WriteResultInfo(httpResponse, "plugin", "", nil) |
| 290 | return |
| 291 | } |
| 292 | |
| 293 | //CheckNameIsExist 检查插件名称是否存在 |
| 294 | func CheckNameIsExist(httpResponse http.ResponseWriter, httpRequest *http.Request) { |
nothing calls this directly
no test coverage detected