Commit adf72bbc authored by Richard Musiol's avatar Richard Musiol Committed by Brad Fitzpatrick

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/118977Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 30b045d4
......@@ -41,6 +41,11 @@
}
return buf.length;
},
openSync(path, flags, mode) {
const err = new Error("not implemented");
err.code = "ENOSYS";
throw err;
},
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment