pkger/internal/examples/extfile/main.go

29 lines
324 B
Go
Raw Normal View History

2019-07-31 00:21:26 +03:00
package main
import (
"fmt"
"io"
"log"
"os"
"github.com/markbates/pkger"
)
func main() {
2019-08-01 19:03:12 +03:00
f, err := pkger.Open("github.com/gobuffalo/meta:/go.mod")
2019-07-31 00:21:26 +03:00
if err != nil {
log.Fatal("1", err)
}
defer f.Close()
fi, err := f.Stat()
if err != nil {
log.Fatal("2", err)
}
fmt.Println(fi)
io.Copy(os.Stdout, f)
}