Re: [go-nuts] Re: go:embed question

2022-10-16 Thread jake...@gmail.com
What makes you think that go run github.com/esimov/caire/cmd/caire@latest is not embedding properly? On my system it seems like it works fine, and the file gets embedded. I'm using go 1.19 on windows. Perhaps you could give a more detailed example of what you are doing (actual commands) and

Re: [go-nuts] Re: go:embed question

2022-10-15 Thread esimov
go run github.com/esimov/caire/cmd/caire@latest. I'm wondering is this somehow related to the fact, that the file which should be embedded is located two levels up to the root tree? The embedable file is located in the data folder, but the file effectively is not embedded in

Re: [go-nuts] Re: go:embed question

2022-10-15 Thread Tamás Gulácsi
It won't work iff that file is not there - e.g. it is not commited into the repo. kortschak a következőt írta (2022. október 14., péntek, 10:50:18 UTC+2): > On Fri, 2022-10-14 at 00:17 -0700, esimov wrote: > > . Now, that's not the case when you are running a package using the > > following

Re: [go-nuts] Re: go:embed question

2022-10-14 Thread 'Dan Kortschak' via golang-nuts
On Fri, 2022-10-14 at 00:17 -0700, esimov wrote: > . Now, that's not the case when you are running a package using the > following command: "go run github.com/user/package@latest" for > example Can you give an example of a real package where this doesn't work? -- You received this message

[go-nuts] Re: go:embed question

2022-10-14 Thread esimov
Let me rephrase it: so normally when you are embedding an external file with the go://embed directive, when you are running the "go run" command it will embed it at compile time. Now, that's not the case when you are running a package using the following command: "go run

[go-nuts] Re: go:embed question

2022-10-13 Thread Marcel Huijkman
I find this question a bit hard to understand. I think it has to do with go run and then a URL, which can't be done. Can you rephrase it? On Wednesday, October 12, 2022 at 9:37:17 AM UTC+2 esi...@gmail.com wrote: > I know that //go:embed directive reads the content of the embedable file > at