Skip to content

Commit 962ce57

Browse files
committed
fix final newline when reading files
1 parent 25237b6 commit 962ce57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

json-to-go.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ if (typeof module != 'undefined') {
491491
} else if (process.argv.length === 3) {
492492
const fs = require('node:fs');
493493
const json = fs.readFileSync(process.argv[2], 'utf8');
494-
console.log(jsonToGo(json).go)
494+
process.stdout.write(jsonToGo(json).go)
495495
} else {
496496
process.stdin.on('data', function(buf) {
497497
const json = buf.toString('utf8')

0 commit comments

Comments
 (0)