This is quite an open answer.
The point I am trying to make is, why not all the files from the external
library available in the vendor folder. why only selective. (selection is
based on the build). These files can be txt , md , go , go test or
zzz...doesn't matter.
Ultimately it's the developer's
This seems like a good Idea...I will try and let you know soon.
Thanks,
Sachin.
On Fri, Jun 18, 2021 at 6:16 PM jake...@gmail.com
wrote:
> I don't use vendor, so I'm just thinking here. If I understand correctly,
> a "//go:embed" statement will cause the the target file to be included in
> the
I believe you should distinguish between the build and the run environment.
Your build environment is largely defined by the language and its
ecosystem, e.g. the vendor folder has a semantic for the Go tools. After
the build you deploy the resulting artifacts to your run environment. That
may be th
I don't use vendor, so I'm just thinking here. If I understand correctly, a
"//go:embed" statement will cause the the target file to be included in the
vendor. If that is the case, then perhaps you could create a
vendored_files.go file that embeds all the files you want vendored, then
add a bui
Dear Gophers,
I have some more thoughts about the vendoring issue I observed earlier.
Preface :
Basically while vendoring other than go files, nothing is copied in the
vendor folder(except the embed package).
It can be some Readme.MD, or some text file, or HTML templates.
Issue Details:
In the l
Hi Sean,
Thanks for the response. Though I am not sure if the solution satisfies my
use case. I am doing some experimentation and will get back to you soon
with the findings.
Thanks and Regards,
Sachin.
On Sun, May 9, 2021 at 9:47 PM Sean Liao wrote:
> `go mod vendor` only includes what is need
`go mod vendor` only includes what is needed to build your main module.
1.16 has https://pkg.go.dev/embed so you can embed static assets (such as
template/html files) into your final binary
(they will also be available in the vendor directory but I don't think this
is your final goal)
On Sunday,