Something went wrong. Try again.
🌱 A minimal programming language and compiler. git.urbach.dev/cli/q
high-performance programming-language compiler
Something went wrong. Try again.
12345678910111213141516171819202122232425262728//go:build !linux
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}