]> Cypherpunks repositories - gostls13.git/commit
internal/testenv: simplify hasSymlink for windows
authorKir Kolyshkin <kolyshkin@gmail.com>
Fri, 30 Aug 2024 00:35:13 +0000 (17:35 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 30 Aug 2024 17:09:46 +0000 (17:09 +0000)
commit7300b9e633f8b8cb49e2e95f4c4693657ded3451
tree10675a347d4583328dc872ce63943f694b2f6647
parentb648cd620f47c2981420b032def1e6f6491ef294
internal/testenv: simplify hasSymlink for windows

1. Combine two functions into one.

2. Use errors.Is to check for wrapped errors.

3. Use sync.OnceValues.

Change-Id: I25f55d31bb658ff08da209b1740e9dff579cca69
Reviewed-on: https://go-review.googlesource.com/c/go/+/609797
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Ian Lance Taylor <iant@golang.org>
src/internal/testenv/testenv_windows.go