Supported by big Go since 1.20 for all commands. It's helpful for scripting. Expected behavior:
cd's to argument
runs rest of command
tinygo run -C path/to/dir some_file.go # some_file.go is in path/to/dir
See go help build:
% go help build
usage: go build [-o output] [build flags] [packages]
[...]
-C dir
Change to dir before running the command.
Any files named on the command line are interpreted after
changing directories.
If used, this flag must be the first one in the command line.
[...]
Supported by big Go since 1.20 for all commands. It's helpful for scripting. Expected behavior:
runs rest of command
tinygo run -C path/to/dir some_file.go # some_file.go is in path/to/dir
See
go help build
: