File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -453,7 +453,7 @@ func actionProcessStdinTemplate(changesets []changeset) (int) {
453453 }
454454
455455 content := parseContentAsTemplate (buffer .String (), changesets )
456- fmt .Println (content .String ())
456+ fmt .Print (content .String ())
457457
458458 return 0
459459}
Original file line number Diff line number Diff line change @@ -350,3 +350,22 @@ Testing template mode:
350350 this is the second line
351351 this is the third foobar line
352352 this is the last line
353+
354+ Testing template mode:
355+
356+ $ cat > test. txt << EOF
357+ > {{23 -}} < {{- 45 }}
358+ > {{. Arg. Foobar}}
359+ > this is a testline
360+ > this is the second line
361+ > this is the third foobar line
362+ > this is the last line
363+ > EOF
364+ $ cat test. txt | goreplace -- mode= template -- stdin -s Foobar -r ___xxx test. txt
365+ 23 < 45
366+ ___xxx
367+ this is a testline
368+ this is the second line
369+ this is the third foobar line
370+ this is the last line
371+
You can’t perform that action at this time.
0 commit comments