lint fixes

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-09-30 21:13:13 +03:00
parent 7b2e3cc8aa
commit 3247d144a8
14 changed files with 62 additions and 46 deletions

View File

@@ -34,9 +34,9 @@ type tunBatchSubscriber struct {
}
type tunEvent struct {
err error
message *broker.Message
topic string
err error
}
// used to access tunnel from options context
@@ -199,7 +199,9 @@ func (t *tunBatchSubscriber) run() {
},
}}
// handle the message
go t.handler(evts)
go func() {
_ = t.handler(evts)
}()
}
}
@@ -235,13 +237,15 @@ func (t *tunSubscriber) run() {
c.Close()
// handle the message
go t.handler(&tunEvent{
topic: t.topic,
message: &broker.Message{
Header: m.Header,
Body: m.Body,
},
})
go func() {
_ = t.handler(&tunEvent{
topic: t.topic,
message: &broker.Message{
Header: m.Header,
Body: m.Body,
},
})
}()
}
}

View File

@@ -37,7 +37,7 @@ func (t *tunTransport) Init(opts ...transport.Option) error {
// get the transport
tr, ok := t.options.Context.Value(transportKey{}).(transport.Transport)
if ok {
tun.Init(tunnel.Transport(tr))
_ = tun.Init(tunnel.Transport(tr))
}
// set the tunnel