From a64eff1044265335ffae287ce845d595eca93959 Mon Sep 17 00:00:00 2001 From: xvcai <5347640+xvcai@user.noreply.gitee.com> Date: Mon, 11 Jan 2021 14:15:35 +0800 Subject: [PATCH] update apis/process/task.go. --- apis/process/task.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/process/task.go b/apis/process/task.go index 3dd3b03..1ae5020 100644 --- a/apis/process/task.go +++ b/apis/process/task.go @@ -48,7 +48,7 @@ func TaskList(c *gin.Context) { file := make(map[string]interface{}) fileClassify := strings.Split(fn, ".") fileDetails := strings.Split(fileClassify[0], "-") - switch fileClassify[1] { + switch fileClassify[len(fileClassify)-1]] { case "py": file["classify"] = "Python" case "sh": -- Gitee