summaryrefslogtreecommitdiffhomepage
path: root/test/cmd
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2020-12-11 12:04:46 -0800
committergVisor bot <gvisor-bot@google.com>2020-12-11 12:06:49 -0800
commit4cba3904f414775371f86571a549454aafad19bf (patch)
tree3f6953bb76029dc5b9705ffb38e95c7190255818 /test/cmd
parent76c2f21cecf6c690aaf3aba8eccbc593eb3a6305 (diff)
Remove existing nogo exceptions.
PiperOrigin-RevId: 347047550
Diffstat (limited to 'test/cmd')
-rw-r--r--test/cmd/test_app/fds.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/cmd/test_app/fds.go b/test/cmd/test_app/fds.go
index a7658eefd..d4354f0d3 100644
--- a/test/cmd/test_app/fds.go
+++ b/test/cmd/test_app/fds.go
@@ -16,6 +16,7 @@ package main
import (
"context"
+ "io"
"io/ioutil"
"log"
"os"
@@ -168,8 +169,8 @@ func (fdr *fdReceiver) Execute(ctx context.Context, f *flag.FlagSet, args ...int
file := os.NewFile(uintptr(fd), "received file")
defer file.Close()
- if _, err := file.Seek(0, os.SEEK_SET); err != nil {
- log.Fatalf("Seek(0, 0) failed: %v", err)
+ if _, err := file.Seek(0, io.SeekStart); err != nil {
+ log.Fatalf("Error from seek(0, 0): %v", err)
}
got, err := ioutil.ReadAll(file)