On Sat, Jun 4, 2022 at 5:10 AM Domenico Andreoli <ca...@debian.org> wrote: > > Dear DGPT, > > Moving my first steps as Go packager, packaging > golang-github-flowstack-go-jsonschema here. > > The build fails with this error: > > _build/src/github.com/flowstack/go-jsonschema/schemas.go:11:13: pattern > schemas/draft-04.json: no matching files found > > At those lines in schmas.go, I read: > > //go:embed schemas/draft-04.json > draft04Source []byte > > The schemas/draft-04.json file is present in the source tree base but > not in _build hence, my guess, the error. > > I cannot be the first to package some code using //go:embed, what is > the most adopted solution to this issue? >
https://manpages.debian.org/unstable/dh-golang/Debian::Debhelper::Buildsystem::golang.3pm.en.html#DH_GOLANG_INSTALL_EXTRA Add `export DH_GOLANG_INSTALL_EXTRA := schemas/draft-04.json` to d/rules. -- Shengjing Zhu