pkger/pkging/pkgtest/testdata/ref/mod/mod.go

22 lines
277 B
Go
Raw Normal View History

package mod
import (
"io/ioutil"
"github.com/markbates/pkger"
)
func Mod() (string, error) {
f, err := pkger.Open("/go.mod")
if err != nil {
return "", nil
}
defer f.Close()
b, err := ioutil.ReadAll(f)
if err != nil {
return "", nil
}
return string(b), nil
}