]> Cypherpunks.ru repositories - gostls13.git/commitdiff
misc/cgo: replace os.SEEK_SET with io.SeekStart
authorhopehook <hopehook.com@gmail.com>
Fri, 16 Sep 2022 00:13:23 +0000 (08:13 +0800)
committerGopher Robot <gobot@golang.org>
Mon, 19 Sep 2022 16:55:26 +0000 (16:55 +0000)
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>

misc/cgo/testcarchive/carchive_test.go

index f8be3f9c0c6133dfd502f062caf45acc639b0ca0..30e12be6c64bb6b5348ac24049740b42bc6ef527 100644 (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)
                }
        }