pkger/walk.go

16 lines
206 B
Go
Raw Normal View History

2019-07-31 00:21:26 +03:00
package pkger
2019-08-01 19:03:12 +03:00
import (
"os"
)
2019-08-02 05:34:32 +03:00
type WalkFunc func(Path, os.FileInfo) error
2019-07-31 00:21:26 +03:00
func Walk(p string, wf WalkFunc) error {
2019-08-02 05:34:32 +03:00
pt, err := Parse(p)
2019-07-31 00:21:26 +03:00
if err != nil {
return err
}
return rootIndex.Walk(pt, wf)
}