Skip to content

Commit

Permalink
imported extra package
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewI26 committed Nov 30, 2024
1 parent 35388c1 commit 8dd2023
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/tracetest/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"go.uber.org/zap"

"github.com/macformula/hil/canlink"
"github.com/macformula/hil/canlink/tracewriters"
"github.com/macformula/hil/macformula/cangen/vehcan"
"github.com/pkg/errors"
)
Expand Down Expand Up @@ -50,13 +51,17 @@ func main() {

canClient := canlink.NewCanClient(vehcan.Messages(), conn, logger)

writers := make([]canlink.TraceWriter, 0)

Check failure on line 54 in cmd/tracetest/main.go

View workflow job for this annotation

GitHub Actions / build

undefined: canlink.TraceWriter
writers = append(writers, tracewriters.NewAsciiWriter(logger))
writers = append(writers, tracewriters.NewJsonWriter(logger))

tracer := canlink.NewTracer(
_canIface,
_traceDir,
logger,
conn,
canlink.WithBusName(_busName),
canlink.WithConvertToString(canlink.ConvertToAscii))
canlink.WithTraceWriters(writers))

err = canClient.Open()
if err != nil {
Expand Down Expand Up @@ -94,11 +99,6 @@ func main() {
logger.Error("close tracer", zap.Error(err))
}

err = canClient.Close()
if err != nil {
logger.Error("close can client", zap.Error(err))
}

if tracer.Error() != nil {
logger.Error("tracer error", zap.Error(tracer.Error()))
}
Expand Down

0 comments on commit 8dd2023

Please sign in to comment.