Skip to content

Commit

Permalink
Remove utils.BroadcastWriter
Browse files Browse the repository at this point in the history
I'm not sure why this ever existed, it's basically a copy of
io.MultiWriter that lacks the io.StringWriter implementation.
  • Loading branch information
zmb3 committed Dec 31, 2021
1 parent b569adc commit f141d83
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 51 deletions.
5 changes: 3 additions & 2 deletions lib/kube/proxy/forwarder.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"crypto/x509"
"encoding/pem"
"fmt"
"io"
mathrand "math/rand"
"net"
"net/http"
Expand Down Expand Up @@ -879,8 +880,8 @@ func (f *Forwarder) exec(ctx *authContext, w http.ResponseWriter, req *http.Requ
}
if recorder != nil {
// capture stderr and stdout writes to session recorder
streamOptions.Stdout = utils.NewBroadcastWriter(streamOptions.Stdout, recorder)
streamOptions.Stderr = utils.NewBroadcastWriter(streamOptions.Stderr, recorder)
streamOptions.Stdout = io.MultiWriter(streamOptions.Stdout, recorder)
streamOptions.Stderr = io.MultiWriter(streamOptions.Stderr, recorder)
}

// Defer a cleanup handler that will mark the stream as complete on exit, regardless of
Expand Down
49 changes: 0 additions & 49 deletions lib/utils/writer.go

This file was deleted.

0 comments on commit f141d83

Please sign in to comment.