aboutsummaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2022-08-05 11:37:47 +0200
committerTobias Klauser <tobias.klauser@gmail.com>2022-08-08 17:01:54 +0000
commit0a86cd6857b9fb12a798b3dbcfb6974384aa07d6 (patch)
tree0a484af459668a34ba679ffe4edf8641049e8980 /src/testing
parent2493072db68a8f8b545bb2a6faebac0da0f01336 (diff)
downloadgo-0a86cd6857b9fb12a798b3dbcfb6974384aa07d6.tar.xz
all: use io.Seek* instead of deprecated os.SEEK_*
These are available since Go 1.7. The version used for bootstrap is Go 1.17 for Go 1.20. For #44505 Change-Id: I497c9f617baefdeb273cd115b08b6e31bd10aad2 Reviewed-on: https://go-review.googlesource.com/c/go/+/421634 Reviewed-by: Than McIntosh <thanm@google.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/run_example_js.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/testing/run_example_js.go b/src/testing/run_example_js.go
index adef9511fb..f3a11201a1 100644
--- a/src/testing/run_example_js.go
+++ b/src/testing/run_example_js.go
@@ -36,7 +36,7 @@ func runExample(eg InternalExample) (ok bool) {
// Restore stdout, get output and remove temporary file.
os.Stdout = stdout
var buf strings.Builder
- _, seekErr := f.Seek(0, os.SEEK_SET)
+ _, seekErr := f.Seek(0, io.SeekStart)
_, readErr := io.Copy(&buf, f)
out := buf.String()
f.Close()