chore: 项目基线(基于 WeKnora 定制版,整理文件忽略规则)
This commit is contained in:
commit
9097ee699d
5769 files changed
+1446466
No files matched your search
@@ -0,0 +1,26 @@
|
||||
package tools
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/Tencent/WeKnora/internal/utils"
|
||||
)
|
||||
|
||||
func extractExportedEnv(command string) map[string]string {
|
||||
return utils.ExtractShellAssignments(command)
|
||||
}
|
||||
|
||||
func collectUsedSkillEnv(command string, toolEnv map[string]string) map[string]string {
|
||||
out := extractExportedEnv(command)
|
||||
for name, value := range toolEnv {
|
||||
if strings.TrimSpace(value) == "" {
|
||||
continue
|
||||
}
|
||||
out[name] = value
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
func maskCommandAssignments(command string) string {
|
||||
return utils.MaskCommandAssignments(command)
|
||||
}
|
||||
Reference in new issue
Block a user