mirror of
https://github.com/golang/go
synced 2024-11-02 13:42:29 +00:00
misc/wasm: add stub for fs.openSync for browsers
This stub is necessary so the time package can fail to load the timezone files in a nice way. It transitively makes the log package work in browsers. Change-Id: I4d360df82989d9b40cd31bb4508a6d057534443e Reviewed-on: https://go-review.googlesource.com/118977 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
30b045d4d1
commit
adf72bbc9a
1 changed files with 5 additions and 0 deletions
|
@ -41,6 +41,11 @@
|
|||
}
|
||||
return buf.length;
|
||||
},
|
||||
openSync(path, flags, mode) {
|
||||
const err = new Error("not implemented");
|
||||
err.code = "ENOSYS";
|
||||
throw err;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue