Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ linters:
deny:
- pkg: "math/rand$"
desc: "use math/rand/v2 instead of math/rand"
no-stdlib-log:
files:
- "**"
- "!**/bundle/docsgen/**"
- "!**/bundle/internal/schema/**"
- "!**/bundle/internal/validation/**"
deny:
- pkg: "log$"
desc: "use libs/log instead of the standard library log package"
forbidigo:
forbid:
- pattern: 'term\.IsTerminal'
Expand Down
5 changes: 3 additions & 2 deletions libs/appproxy/appproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package appproxy
import (
"context"
"io"
"log"
"net"
"net/http"
"net/url"
"strings"

"github.com/databricks/cli/libs/log"
)

type Proxy struct {
Expand Down Expand Up @@ -122,7 +123,7 @@ func (p *Proxy) handleWebSocket(w http.ResponseWriter, r *http.Request) {
// If the error is not EOF, then there was a problem
if err != io.EOF {
// Log the error and perform cleanup
log.Printf("Error copying messages: %v", err)
log.Warnf(r.Context(), "error copying messages: %v", err)
middlewareConn.Close()
targetServerConn.Close()
}
Expand Down
Loading