Skip to content

Commit

Permalink
Add missing newline in grep mode (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
vearutop authored May 12, 2023
1 parent c872c7a commit 51b485c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file modified cmd/catp.pgo
Binary file not shown.
2 changes: 1 addition & 1 deletion cmd/catp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (r *runner) scanFile(rd io.Reader) {
for s.Scan() {
for _, g := range r.grep {
if bytes.Contains(s.Bytes(), g) {
_, _ = os.Stdout.Write(s.Bytes())
_, _ = os.Stdout.Write(append(s.Bytes(), '\n'))
atomic.AddInt64(&r.matches, 1)

break
Expand Down

0 comments on commit 51b485c

Please sign in to comment.