Skip to content
Merged
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
2 changes: 1 addition & 1 deletion internal/http/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (h *ConsoleHandler) ServeWS(w http.ResponseWriter, r *http.Request) {
}
}

inCh <- ssh.Input{Data: msg}
inCh <- ssh.Input{Data: string(msg)}
}
}()

Expand Down
2 changes: 1 addition & 1 deletion internal/ssh/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func (c *Client) Shell(ctx context.Context, rows, cols int) (<-chan Output, chan
continue
}
if len(input.Data) > 0 {
wIn.Write(input.Data)
wIn.Write([]byte(input.Data))
}
}
}()
Expand Down
2 changes: 1 addition & 1 deletion internal/ssh/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type WindowSize struct {
}

type Input struct {
Data []byte
Data string
Resize *WindowSize
}

Expand Down
2 changes: 1 addition & 1 deletion internal/ssh/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (m *MockClient) Shell(ctx context.Context, rows, cols int) (<-chan Output,
if input.Resize != nil {
continue
}
for _, b := range input.Data {
for _, b := range []byte(input.Data) {
if b == '\r' {
outCh <- Output{Data: []byte("\r\n")}
cmd := string(buf)
Expand Down
Loading