1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

all: make eprint[ln] behave same as print[ln] (#7595)

This commit is contained in:
zakuro
2020-12-27 19:22:16 +09:00
committed by GitHub
parent e69e5c5b91
commit 21805ea2a5
5 changed files with 13 additions and 6 deletions

View File

@@ -22,13 +22,13 @@ pub fn print(s any) {
}
pub fn eprintln(s any) {
JS.console.error(s)
JS.console.error(s.toString())
}
pub fn eprint(s any) {
// TODO
// $if js.node {
JS.process.stderr.write(s)
JS.process.stderr.write(s.toString())
// } $else {
// panic('Cannot `eprint` in a browser, use `eprintln` instead')
// }