Skip to content

Commit 72054c3

Browse files
committed
Wrap os.Stdout in CountingWriter
1 parent f7fe1cc commit 72054c3

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

cmd/check/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func main() {
2323
command.CheckForVersionFlag(os.Args, Version, BuildTime)
2424

2525
readWriter := &readwriter.ReadWriter{
26-
Out: os.Stdout,
26+
Out: &readwriter.CountingWriter{W: os.Stdout},
2727
In: os.Stdin,
2828
ErrOut: os.Stderr,
2929
}

cmd/gitlab-shell-authorized-keys-check/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func main() {
2424
command.CheckForVersionFlag(os.Args, Version, BuildTime)
2525

2626
readWriter := &readwriter.ReadWriter{
27-
Out: os.Stdout,
27+
Out: &readwriter.CountingWriter{W: os.Stdout},
2828
In: os.Stdin,
2929
ErrOut: os.Stderr,
3030
}

cmd/gitlab-shell-authorized-principals-check/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func main() {
2424
command.CheckForVersionFlag(os.Args, Version, BuildTime)
2525

2626
readWriter := &readwriter.ReadWriter{
27-
Out: os.Stdout,
27+
Out: &readwriter.CountingWriter{W: os.Stdout},
2828
In: os.Stdin,
2929
ErrOut: os.Stderr,
3030
}

cmd/gitlab-shell/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func main() {
3232
command.CheckForVersionFlag(os.Args, Version, BuildTime)
3333

3434
readWriter := &readwriter.ReadWriter{
35-
Out: os.Stdout,
35+
Out: &readwriter.CountingWriter{W: os.Stdout},
3636
In: os.Stdin,
3737
ErrOut: os.Stderr,
3838
}

internal/sshd/session.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func (s *session) handleShell(ctx context.Context, req *ssh.Request) (context.Co
168168
}
169169

170170
rw := &readwriter.ReadWriter{
171-
Out: s.channel,
171+
Out: &readwriter.CountingWriter{W: s.channel},
172172
In: s.channel,
173173
ErrOut: s.channel.Stderr(),
174174
}

0 commit comments

Comments
 (0)