From 351037d16c16602388709b846420094eabb5ce16 Mon Sep 17 00:00:00 2001 From: hopehook Date: Fri, 16 Sep 2022 08:13:23 +0800 Subject: [PATCH] misc/cgo: replace os.SEEK_SET with io.SeekStart Since os.SEEK_SET was deprecated, use io.SeekStart instead. Change-Id: I11ae496b071ab35412403ff73e52f3da73d5b120 Reviewed-on: https://go-review.googlesource.com/c/go/+/431096 Run-TryBot: Ian Lance Taylor Run-TryBot: hopehook Reviewed-by: Cherry Mui Reviewed-by: Ian Lance Taylor TryBot-Result: Gopher Robot Auto-Submit: Ian Lance Taylor --- misc/cgo/testcarchive/carchive_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/cgo/testcarchive/carchive_test.go b/misc/cgo/testcarchive/carchive_test.go index f8be3f9c0c..30e12be6c6 100644 --- a/misc/cgo/testcarchive/carchive_test.go +++ b/misc/cgo/testcarchive/carchive_test.go @@ -402,7 +402,7 @@ func checkELFArchive(t *testing.T, arname string) { } off += size - if _, err := f.Seek(off, os.SEEK_SET); err != nil { + if _, err := f.Seek(off, io.SeekStart); err != nil { t.Errorf("%s: failed to seek to %d: %v", arname, off, err) } } -- 2.44.0