From 78d030aa7a7dfc19ca40860fea1bcbd7e93b8e1e Mon Sep 17 00:00:00 2001 From: "Federico G. Schwindt" Date: Fri, 28 May 2021 23:40:55 +0100 Subject: [PATCH] Add os stubs required for net/http --- src/os/file.go | 5 +++++ src/os/tempfile.go | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 src/os/tempfile.go diff --git a/src/os/file.go b/src/os/file.go index 99977fa4..a7aa4043 100644 --- a/src/os/file.go +++ b/src/os/file.go @@ -116,6 +116,11 @@ func (f *File) Readdirnames(n int) (names []string, err error) { return nil, &PathError{"readdirnames", f.name, ErrNotImplemented} } +// Seek is a stub, not yet implemented +func (f *File) Seek(offset int64, whence int) (ret int64, err error) { + return 0, &PathError{"seek", f.name, ErrNotImplemented} +} + // Stat is a stub, not yet implemented func (f *File) Stat() (FileInfo, error) { return nil, &PathError{"stat", f.name, ErrNotImplemented} diff --git a/src/os/tempfile.go b/src/os/tempfile.go new file mode 100644 index 00000000..27949f7f --- /dev/null +++ b/src/os/tempfile.go @@ -0,0 +1,5 @@ +package os + +func CreateTemp(dir, pattern string) (*File, error) { + return nil, &PathError{"createtemp", pattern, ErrNotImplemented} +}