Skip to content

Commit d513cae

Browse files
leongrossdeadprogram
authored andcommitted
add SetReadDeadline stub
1 parent e612f7c commit d513cae

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/os/file.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"io/fs"
2424
"runtime"
2525
"syscall"
26+
"time"
2627
)
2728

2829
// Seek whence values.
@@ -256,6 +257,12 @@ func (f *File) SyscallConn() (conn syscall.RawConn, err error) {
256257
return
257258
}
258259

260+
// SetReadDeadline sets the deadline for future Read calls and any
261+
// currently-blocked Read call.
262+
func (f *File) SetReadDeadline(t time.Time) error {
263+
return f.setReadDeadline(t)
264+
}
265+
259266
// fd is an internal interface that is used to try a type assertion in order to
260267
// call the Fd() method of the underlying file handle if it is implemented.
261268
type fd interface {

src/os/file_posix.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@ import (
88
func Chtimes(name string, atime time.Time, mtime time.Time) error {
99
return ErrNotImplemented
1010
}
11+
12+
// setReadDeadline sets the read deadline, not yet implemented
13+
func (f *File) setReadDeadline(_ time.Time) error {
14+
return ErrNotImplemented
15+
}

0 commit comments

Comments
 (0)