LingxinMeng 10 月之前
父节点
当前提交
148bb87392

+ 1 - 5
tools/plugin-compile/package/config/oss_config.go → tools/plugin-compile/package/config/c_oss.go

@@ -2,13 +2,9 @@ package config
 
 import (
 	"cicv-data-closedloop/common/config/c_log"
-
-	"os"
-)
-
-import (
 	"fmt"
 	"github.com/aliyun/aliyun-oss-go-sdk/oss"
+	"os"
 )
 
 var (

+ 1 - 2
tools/plugin-compile/package/handler/compile_plugin.go

@@ -2,7 +2,6 @@ package handler
 
 import (
 	"cicv-data-closedloop/common/config/c_log"
-	"cicv-data-closedloop/common/config/c_oss"
 	"cicv-data-closedloop/common/entity"
 	util2 "cicv-data-closedloop/common/util"
 	"cicv-data-closedloop/tools/plugin-compile/package/config"
@@ -56,7 +55,7 @@ func (h *CompileHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
 	tempMiddlePath := uuid.New().String()[:8]
 	goLocalPath := codeDir + tempMiddlePath + "/main/" + tempMiddlePath + ".go"
 	c_log.GlobalLogger.Infof("下载源代码 %v --> %v", goObjectKey, goLocalPath)
-	if err := util2.LimitDownload(c_oss.OssBucket, 41943040, goObjectKey, goLocalPath); err != nil {
+	if err := util2.LimitDownload(config.OssBucket, 41943040, goObjectKey, goLocalPath); err != nil {
 		c_log.GlobalLogger.Error("下载源代码 ", goObjectKey, " 出错:", err)
 		result, _ := json.Marshal(entity.HttpResult{Status: false, Code: "1004", Message: "下载源代码 " + goObjectKey + " 出错。"})
 		_, _ = fmt.Fprintf(w, string(result))