1
0
mirror of https://github.com/golang/go synced 2024-11-26 03:57:57 -07:00

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 <iant@google.com>
Run-TryBot: hopehook <hopehook@golangcn.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
This commit is contained in:
hopehook 2022-09-16 08:13:23 +08:00 committed by Gopher Robot
parent f4becf15bd
commit 351037d16c

View File

@ -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)
}
}