From 7e53cf7c7e24004a7b9515bbe129dee754dba075 Mon Sep 17 00:00:00 2001 From: mrhblfx <116722876+mrhblfx@users.noreply.github.com> Date: Wed, 12 Apr 2023 22:33:34 +0800 Subject: [PATCH] =?UTF-8?q?=20=E5=A2=9E=E5=8A=A0=E4=BA=86=E8=A7=A3?= =?UTF-8?q?=E6=9E=90Go=E9=A1=B9=E7=9B=AE=E5=8C=B9=E9=85=8D=E7=9A=84?= =?UTF-8?q?=E6=96=87=E4=BB=B6:=20`go.mod`,=20`go.sum`,=20`go.work`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crazy_functions/解析项目源代码.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crazy_functions/解析项目源代码.py b/crazy_functions/解析项目源代码.py index 0edcbf1..7c56e82 100644 --- a/crazy_functions/解析项目源代码.py +++ b/crazy_functions/解析项目源代码.py @@ -225,7 +225,10 @@ def 解析一个Golang项目(txt, llm_kwargs, plugin_kwargs, chatbot, history, s report_execption(chatbot, history, a=f"解析项目: {txt}", b=f"找不到本地项目或无权访问: {txt}") yield from update_ui(chatbot=chatbot, history=history) # 刷新界面 return - file_manifest = [f for f in glob.glob(f'{project_folder}/**/*.go', recursive=True)] + file_manifest = [f for f in glob.glob(f'{project_folder}/**/*.go', recursive=True)] + \ + [f for f in glob.glob(f'{project_folder}/**/go.mod', recursive=True)] + \ + [f for f in glob.glob(f'{project_folder}/**/go.sum', recursive=True)] + \ + [f for f in glob.glob(f'{project_folder}/**/go.work', recursive=True)] if len(file_manifest) == 0: report_execption(chatbot, history, a=f"解析项目: {txt}", b=f"找不到任何golang文件: {txt}") yield from update_ui(chatbot=chatbot, history=history) # 刷新界面