My apologies for taking so long to respond; a new job and cold weather have
taken up most of my time.
I have two versions of the application; one CLI and one web. The programs create
characters for games and fiction, and use data text files relative to the binary (
/data/* ) to get names. The
On Wed, Feb 23, 2022 at 1:47 PM Gergely Brautigam
wrote:
> Hi!
>
> The best way to do it is, to have these files in a folder next to the test
> called `testdata` and then when the test starts, simply copy them into a
> temp location. And then make your program work with an environment property
>
On Wed, Feb 23, 2022 at 8:53 AM Leam Hall wrote:
> My program uses data and template files located relative to the binary.
> Since go test creates the binary under test in /tmp/go-build., there
> are no data or template files. How do I either specify what directory to
> build in so I can
Use t.TestDir()
https://pkg.go.dev/testing#T.TempDir
On Wednesday, 23 February 2022 at 14:37:54 UTC mlevi...@gmail.com wrote:
> Use absolute paths? Feels like you're trying to bend something very hard
> here
>
> On Wed, Feb 23, 2022 at 2:54 PM Leam Hall wrote:
>
>> My program uses data and
Use absolute paths? Feels like you're trying to bend something very hard
here
On Wed, Feb 23, 2022 at 2:54 PM Leam Hall wrote:
> My program uses data and template files located relative to the binary.
> Since go test creates the binary under test in /tmp/go-build., there
> are no data or
My program uses data and template files located relative to the binary. Since
go test creates the binary under test in /tmp/go-build., there are no data
or template files. How do I either specify what directory to build in so I can
create the files, or get the tmp directory name before the