Commit Graph

4 Commits (master)

Author SHA1 Message Date
Daniel Martí 97ae350b0e apply minor cleanups suggested by tools
GARBLE_PARENT_WORK hasn't been used for a while.
A couple of other minor simplifications.
3 months ago
Daniel Martí 20a92460d5 all: use cmd.Environ rather than os.Environ
Added in Go 1.19, this keeps os/exec's default environment logic,
such as ensuring that $PWD is always set.
1 year ago
Daniel Martí 23f9f54102 scripts: no need for this directory to be a Go package
It's perfectly fine for bench_literals.go to be a main package itself,
but the scripts directory doesn't need to be a Go package

This was bothering me at times; for example, "go list ./..." would
show the scripts directory, or "go install mvdan.cc/garble/..." would
build and install a "scripts" binary as well.

The file can still be built or run directly, like either of:

    go build bench_literals.go
    go run bench_literals.go
2 years ago
pagran 9a8608f061
internal/literals: add benchmark to measure the run-time overhead 2 years ago