On Sat, Jun 04, 2022 at 05:13:39AM +0800, Shengjing Zhu wrote: > 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. >
man dh-golang, should have imagined! Next time I'll study better. Thanks a lot, Dom > -- > Shengjing Zhu > -- rsa4096: 3B10 0CA1 8674 ACBA B4FE FCD2 CE5B CF17 9960 DE13 ed25519: FFB4 0CC3 7F2E 091D F7DA 356E CC79 2832 ED38 CB05
signature.asc
Description: PGP signature