nixpkgs/pkgs/development/go-packages/generic
Berk D. Demir 89864413b2 go-modules/packages: Run unit tests under subdirs
Bug:
Due to the way `buildGoDir` function was repurposed to also run `go
test`, if `checkFlags` was defined, `go test` was ran only at the top
level directory. Only the first element of `checkFlags` array would get
passed to the `go test` command as arguments.

Fix:
Now the first parameter to `buildGoDir` is handled as the command.  If
the command is "test" `checkFlags` get passed as arguments along with
other build flags like ldflags, tags, etc.

Readability:
- Iteratively build a flag array in `buildGoDir` instead of single long
  variable expansion command line.
- Bash style: Single line local assignment of positional parameters.
2022-06-01 00:52:20 +00:00
..
default.nix go-modules/packages: Run unit tests under subdirs 2022-06-01 00:52:20 +00:00