aboutsummaryrefslogtreecommitdiff
path: root/src/syscall
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2020-07-05 16:34:27 -0400
committerRuss Cox <rsc@golang.org>2020-10-13 00:55:35 +0000
commit84f3b33f10d8f12818975cb188da46145ac2036a (patch)
treefc2157888909a0c04d8f6c4a3974ddb662423a12 /src/syscall
parent5ef78c4d84620f6594ad63cbd1b3b43f41670636 (diff)
downloadgo-84f3b33f10d8f12818975cb188da46145ac2036a.tar.gz
go-84f3b33f10d8f12818975cb188da46145ac2036a.zip
syscall: remove dependency on io
Keep syscall and io separated; neither should depend on the other. Change-Id: Icdd61bd0c05d874cabd7b5ae6631dd09dec90112 Reviewed-on: https://go-review.googlesource.com/c/go/+/243902 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'src/syscall')
-rw-r--r--src/syscall/fs_js.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/syscall/fs_js.go b/src/syscall/fs_js.go
index 262ec28afd..673feea77f 100644
--- a/src/syscall/fs_js.go
+++ b/src/syscall/fs_js.go
@@ -8,7 +8,6 @@ package syscall
import (
"errors"
- "io"
"sync"
"syscall/js"
)
@@ -456,11 +455,11 @@ func Seek(fd int, offset int64, whence int) (int64, error) {
var newPos int64
switch whence {
- case io.SeekStart:
+ case 0:
newPos = offset
- case io.SeekCurrent:
+ case 1:
newPos = f.pos + offset
- case io.SeekEnd:
+ case 2:
var st Stat_t
if err := Fstat(fd, &st); err != nil {
return 0, err