pkger/examples/walk/main.go

27 lines
408 B
Go
Raw Normal View History

2019-07-31 00:21:26 +03:00
package main
import (
"fmt"
"log"
"os"
"github.com/markbates/pkger"
)
func main() {
2019-08-02 05:34:32 +03:00
err := pkger.Walk("github.com/gobuffalo/envy", func(path pkger.Path, info os.FileInfo) error {
2019-07-31 00:21:26 +03:00
fmt.Println(path)
return nil
})
if err != nil {
log.Fatal(err)
}
2019-08-18 19:38:21 +03:00
err = pkger.Walk("/", func(path pkger.Path, info os.FileInfo) error {
fmt.Println(path)
return nil
})
if err != nil {
log.Fatal(err)
}
2019-07-31 00:21:26 +03:00
}