Fixed build constraints for other systems

This commit is contained in:
Eduard Urbach 2025-02-16 17:39:03 +01:00
parent ac55700ddd
commit 6cdcfbba1d
Signed by: eduard
GPG key ID: 49226B848C78F6C8
2 changed files with 2 additions and 2 deletions

View file

@ -1,28 +0,0 @@
//go:build windows
package fs
import "os"
// Walk calls your callback function for every file name inside the directory.
// It doesn't distinguish between files and directories.
func Walk(directory string, callBack func(string)) error {
f, err := os.Open(directory)
if err != nil {
return err
}
files, err := f.Readdirnames(0)
f.Close()
if err != nil {
return err
}
for _, file := range files {
callBack(file)
}
return nil
}