pkger/examples/complex/read.go

19 lines
222 B
Go
Raw Permalink Normal View History

2019-10-09 20:21:54 +03:00
package main
import (
"io"
"os"
"github.com/markbates/pkger"
)
func readFile() error {
f, err := pkger.Open("/go.mod")
if err != nil {
return err
}
defer f.Close()
_, err = io.Copy(os.Stdout, f)
return err
}