Fixed build constraints for other systems
This commit is contained in:
parent
ac55700ddd
commit
6cdcfbba1d
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue