diff options
| author | Daniel Martà <mvdan@mvdan.cc> | 2023-09-30 09:57:36 +0100 |
|---|---|---|
| committer | Daniel Martà <mvdan@mvdan.cc> | 2023-10-03 06:40:46 +0000 |
| commit | 352c8835e7609ad72872b5a63bffeb6142b29d98 (patch) | |
| tree | d81bd3d557e8004722827acf130a5f29d8fba531 /src/database/sql | |
| parent | 122b35e838af8ab9c0d5027741d6f73cef09f966 (diff) | |
| download | go-352c8835e7609ad72872b5a63bffeb6142b29d98.tar.xz | |
make.bash: use [[ rather than [
[[ is a compound command part of the language with structure,
whereas [ is simply a standard program with string arguments.
The former has a few significant advantages over the latter:
* Better syntax, e.g. && and || rather than -a and -o,
as well as == rather than = for comparisons
* No need for fork+exec to evaluate each conditional
* Forgetting the closing token is an early parse error
The only advantage of [ over [[ is that [[ is Bash syntax,
whereas [ and "test" are portable POSIX Shell utilities.
However, this is a Bash script, so that is not a concern.
Change-Id: I8a4bdd16845bd67bf67a348d7d96d45d5b131d85
Reviewed-on: https://go-review.googlesource.com/c/go/+/531875
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/database/sql')
0 files changed, 0 insertions, 0 deletions
