goroutine

main
sandyx 1 year ago
parent b6ed586a2d
commit fec8172ae0

@ -90,8 +90,8 @@ func main() {
} }
for _, e := range entries { for _, e := range entries {
go func() { go func(name string) {
new := e.Name() new := name
newImg := strings.TrimSuffix(new, filepath.Ext(new)) + ".png" newImg := strings.TrimSuffix(new, filepath.Ext(new)) + ".png"
if filepath.Ext(new) != ".pdf" { if filepath.Ext(new) != ".pdf" {
@ -100,7 +100,7 @@ func main() {
dir, _ := filepath.Abs(*directory) dir, _ := filepath.Abs(*directory)
cmd := exec.Command("./tncmd.sh", filepath.Join(dir, e.Name())) cmd := exec.Command("./tncmd.sh", filepath.Join(dir, name))
fmt.Println(cmd) fmt.Println(cmd)
@ -125,7 +125,7 @@ func main() {
} }
}) })
} }
}() }(e.Name())
} }
for _, e := range entries { for _, e := range entries {

Loading…
Cancel
Save