瀏覽代碼

feat:debug

Yeuoly 1 年之前
父節點
當前提交
4f93e496fa
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      internal/static/config.go

+ 5 - 0
internal/static/config.go

@@ -28,6 +28,11 @@ func InitConfig(path string) error {
 		return err
 	}
 
+	debug, err := strconv.ParseBool(os.Getenv("DEBUG"))
+	if err == nil {
+		difySandboxGlobalConfigurations.App.Debug = debug
+	}
+
 	max_workers := os.Getenv("MAX_WORKERS")
 	if max_workers != "" {
 		difySandboxGlobalConfigurations.MaxWorkers, _ = strconv.Atoi(max_workers)