summaryrefslogtreecommitdiff
path: root/src/syscall/syscall_unix_test.go
diff options
context:
space:
mode:
authorJoe Tsai <joetsai@digital-static.net>2016-04-05 11:22:53 -0700
committerBrad Fitzpatrick <bradfitz@golang.org>2016-05-06 00:10:41 +0000
commitacc757f678a42ba1ffbf8bb9886de4fe080302de (patch)
treef412c541e65290080925060d7d748ec7ef4f4ecb /src/syscall/syscall_unix_test.go
parent6db98a3c51549eb5e1e481e9bca6ede7e8e15f54 (diff)
downloadgo-git-acc757f678a42ba1ffbf8bb9886de4fe080302de.tar.gz
all: use SeekStart, SeekCurrent, SeekEnd
CL/19862 (f79b50b8d5bc159561c1dcf7c17e2a0db96a9a11) recently introduced the constants SeekStart, SeekCurrent, and SeekEnd to the io package. We should use these constants consistently throughout the code base. Updates #15269 Change-Id: If7fcaca7676e4a51f588528f5ced28220d9639a2 Reviewed-on: https://go-review.googlesource.com/22097 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Joe Tsai <joetsai@digital-static.net> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/syscall/syscall_unix_test.go')
-rw-r--r--src/syscall/syscall_unix_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/syscall/syscall_unix_test.go b/src/syscall/syscall_unix_test.go
index c7b4560b76..80544f3319 100644
--- a/src/syscall/syscall_unix_test.go
+++ b/src/syscall/syscall_unix_test.go
@@ -10,6 +10,7 @@ import (
"flag"
"fmt"
"internal/testenv"
+ "io"
"io/ioutil"
"net"
"os"
@@ -244,7 +245,7 @@ func passFDChild() {
}
f.Write([]byte("Hello from child process!\n"))
- f.Seek(0, 0)
+ f.Seek(0, io.SeekStart)
rights := syscall.UnixRights(int(f.Fd()))
dummyByte := []byte("x")
@@ -344,7 +345,7 @@ func TestRlimit(t *testing.T) {
}
func TestSeekFailure(t *testing.T) {
- _, err := syscall.Seek(-1, 0, 0)
+ _, err := syscall.Seek(-1, 0, io.SeekStart)
if err == nil {
t.Fatalf("Seek(-1, 0, 0) did not fail")
}