mirror of https://github.com/golang/go.git
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
|
|
@ -41,6 +41,11 @@
|
||||||
}
|
}
|
||||||
return buf.length;
|
return buf.length;
|
||||||
},
|
},
|
||||||
|
openSync(path, flags, mode) {
|
||||||
|
const err = new Error("not implemented");
|
||||||
|
err.code = "ENOSYS";
|
||||||
|
throw err;
|
||||||
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue