Skip to content

Commit d8a0826

Browse files
authored
Merge pull request #135 from grische/fix/final-newline-for-files
fix final newline when reading files
2 parents 25237b6 + 962ce57 commit d8a0826

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)