Skip to content
Prev Previous commit
Next Next commit
remove unused log
  • Loading branch information
johnstcn committed Mar 1, 2024
commit f513cf63f30cb961156a6f77d59878a126eee9c2
4 changes: 0 additions & 4 deletions cli/support.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"bytes"
"encoding/json"
"fmt"
"log"
"os"
"path/filepath"
"strings"
Expand Down Expand Up @@ -169,10 +168,7 @@ func writeBundle(src *support.Bundle, dest *zip.Writer) error {
}

func humanizeAgentLogs(ls []codersdk.WorkspaceAgentLog) string {
var l log.Logger

var buf bytes.Buffer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we use an intermediary vs passing in the writer? Perhaps can be resolved by wrapping in funcs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried it, makes things more complicated than I'd like.

l.SetOutput(&buf)
tw := tabwriter.NewWriter(&buf, 0, 2, 1, ' ', 0)
for _, l := range ls {
_, _ = fmt.Fprintf(tw, "%s\t[%s]\t%s\n",
Expand Down