打印环境内容更正
All checks were successful
代码更新通知 / update-server (push) Successful in 2s

This commit is contained in:
2024-12-18 14:56:37 +08:00
parent 01f4eecb0b
commit add713ec38

View File

@@ -39,11 +39,13 @@ func main() {
root := filepath.Join(dir, "../") root := filepath.Join(dir, "../")
filepath.WalkDir(root, func(path string, d fs.DirEntry, err error) error { filepath.WalkDir(root, func(path string, d fs.DirEntry, err error) error {
if d.IsDir() { if d.IsDir() {
if d.Name() == ".git" {
return filepath.SkipDir
}
return nil return nil
} }
file := filepath.Join(path, d.Name()) body, _ = os.ReadFile(path)
body, _ = os.ReadFile(file) fmt.Printf("path: %s\n%s\n\n", path, string(body))
fmt.Printf("path: %s\n%s\n\n", file, string(body))
return nil return nil
}) })