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: 5 additions & 4 deletions internal/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/gorilla/websocket"
"github.com/justanotherorganization/l5424"
"github.com/justanotherorganization/l5424/x5424"
"github.com/labstack/echo"
"github.com/labstack/echo/v4"
"github.com/pkg/errors"
)

Expand Down Expand Up @@ -65,9 +65,10 @@ func makeConnectHandler(cfg *config.Config) echo.HandlerFunc {
for {
out := <-outCh
if out != nil {
// FIXME: I really don't like this way of breaking out ANSI instructions
// into something to pass over the websocket...
out.Data = ansi.ReplaceCodes(out.Data)
if p := c.QueryParam("replace"); p == "true" || p == `` {
out.Data = ansi.ReplaceCodes(out.Data)
}

if strings.HasPrefix(out.Data, ansi.Instruction) {
out.Type = pb.Output_INSTRUCTION
fields := strings.Split(out.Data, ansi.Separator)
Expand Down
88 changes: 0 additions & 88 deletions test_client/main.go

This file was deleted.