Skip to content

Commit

Permalink
chore: more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
amuslija committed Mar 19, 2024
1 parent 99c2544 commit db11606
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion subscribe.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ func (c *client) Subscribe(
}
c.messageChan = make(chan paho.Message)
messageCB := func(client paho.Client, msg paho.Message) {

Check warning on line 29 in subscribe.go

View workflow job for this annotation

GitHub Actions / lint

unused-parameter: parameter 'client' seems to be unused, consider removing or renaming it as _ (revive)
println("message received", string(msg.Payload()))

Check failure on line 30 in subscribe.go

View workflow job for this annotation

GitHub Actions / lint

use of `println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)
go func(msg paho.Message) {
println("message received", string(msg.Payload()))
c.messageChan <- msg
}(msg)
}
Expand Down Expand Up @@ -89,6 +89,7 @@ func (c *client) loop(messageChan <-chan paho.Message, timeout uint) {
for {
select {
case msg, ok := <-messageChan:
println(msg, ok, "hello")

Check failure on line 92 in subscribe.go

View workflow job for this annotation

GitHub Actions / lint

use of `println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)
if !ok {
// wanted exit in case of chan close
return
Expand Down

0 comments on commit db11606

Please sign in to comment.