]> Cypherpunks repositories - gostls13.git/commit
go/token, syscall: annotate if blocks that defeat vet's unreachable pass
authorDmitri Shuralyov <dmitshur@golang.org>
Wed, 10 Sep 2025 14:55:19 +0000 (10:55 -0400)
committerGopher Robot <gobot@golang.org>
Wed, 10 Sep 2025 15:29:00 +0000 (08:29 -0700)
commitf327a05419860a782c81a0d57a2e8fb9c517a1d1
treef4354b9f6c80ffed7ecd89db0a29f4378d27ac32
parent9650c97d0fad719b372159a6ca59e722a6e487ce
go/token, syscall: annotate if blocks that defeat vet's unreachable pass

Since putting code in an "if true" block is unusual, make it easier
for readers to understand the purpose of doing this.

For #73998.

Change-Id: I3fd8d65130211c7c01d424366a3c662482d80add
Reviewed-on: https://go-review.googlesource.com/c/go/+/702416
Reviewed-by: Alan Donovan <adonovan@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/go/token/tree.go
src/syscall/env_unix_test.go