diff options
author | Federico G. Schwindt <[email protected]> | 2021-05-28 23:40:55 +0100 |
---|---|---|
committer | Ayke <[email protected]> | 2021-06-01 15:20:58 +0200 |
commit | 78d030aa7a7dfc19ca40860fea1bcbd7e93b8e1e (patch) | |
tree | e3d3b25a7d5d5dce8e7134e4a7911f3cd37346cf | |
parent | 62f9f6166465761cb4f3d6b794f72fdcf8bd58c4 (diff) | |
download | tinygo-78d030aa7a7dfc19ca40860fea1bcbd7e93b8e1e.tar.gz tinygo-78d030aa7a7dfc19ca40860fea1bcbd7e93b8e1e.zip |
Add os stubs required for net/http
-rw-r--r-- | src/os/file.go | 5 | ||||
-rw-r--r-- | src/os/tempfile.go | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/os/file.go b/src/os/file.go index 99977fa4e..a7aa40430 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 000000000..27949f7fa --- /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} +} |