String.prototype.substr is deprecated and usage is no longer
recommended so using String.prototype.substring instead.
Change-Id: I9eb49a8c065890df73301e3a04af59f550bc3ae1
Reviewed-on: https://go-review.googlesource.com/c/go/+/406094
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
outputBuf += decoder.decode(buf);
const nl = outputBuf.lastIndexOf("\n");
if (nl != -1) {
- console.log(outputBuf.substr(0, nl));
- outputBuf = outputBuf.substr(nl + 1);
+ console.log(outputBuf.substring(0, nl));
+ outputBuf = outputBuf.substring(nl + 1);
}
return buf.length;
},