Skip to content

Commit

Permalink
fix: move messages to stderr
Browse files Browse the repository at this point in the history
Signed-off-by: Alessio Greggi <ale_grey_91@hotmail.it>
  • Loading branch information
alegrey91 committed Apr 21, 2024
1 parent 0e0f774 commit d3c7e86
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,18 +188,17 @@ func main() {

var syscalls []uint32
go func() {
//for data := range eventsChannel {
for {
select {
case data := <-eventsChannel:
var e event
if err := binary.Read(bytes.NewBuffer(data), binary.LittleEndian, &e); err != nil {
fmt.Printf("failed to decode received data %q: %s\n", data, err)
fmt.Fprintf(os.Stderr, "failed to decode received data %q: %s\n", data, err)
return
}
syscalls = append(syscalls, e.SyscallID)
case lost := <-lostChannel:
fmt.Printf("lost %d data", lost)
fmt.Fprintf(os.Stderr, "lost %d data", lost)
}
}
}()
Expand Down

0 comments on commit d3c7e86

Please sign in to comment.