From 58272192c97cb856cdea3035a439a703977c4e05 Mon Sep 17 00:00:00 2001 From: Eugene Valeyev Date: Thu, 22 Mar 2018 15:54:11 +0300 Subject: [PATCH] mobile: fixed PR review notes --- mobile/ethclient.go | 8 ++++---- mobile/shhclient.go | 4 ++-- vendor/gopkg.in/check.v1/benchmark.go | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mobile/ethclient.go b/mobile/ethclient.go index 67a3590645..662125c4ad 100644 --- a/mobile/ethclient.go +++ b/mobile/ethclient.go @@ -137,8 +137,8 @@ func (ec *EthereumClient) SubscribeNewHead(ctx *Context, handler NewHeadHandler, case header := <-ch: handler.OnNewHead(&Header{header}) - case err, ok := <-rawSub.Err(): - if ok { + case err := <-rawSub.Err(): + if err != nil { handler.OnError(err.Error()) } return @@ -228,8 +228,8 @@ func (ec *EthereumClient) SubscribeFilterLogs(ctx *Context, query *FilterQuery, case log := <-ch: handler.OnFilterLogs(&Log{&log}) - case err, ok := <-rawSub.Err(): - if ok { + case err := <-rawSub.Err(): + if err != nil { handler.OnError(err.Error()) } return diff --git a/mobile/shhclient.go b/mobile/shhclient.go index f085ff71d0..4834bb2ba8 100644 --- a/mobile/shhclient.go +++ b/mobile/shhclient.go @@ -160,8 +160,8 @@ func (wc *WhisperClient) SubscribeMessages(ctx *Context, criteria *Criteria, han case message := <-ch: handler.OnNewMessage(&Message{message}) - case err, ok := <-rawSub.Err(): - if ok { + case err := <-rawSub.Err(): + if err != nil { handler.OnError(err.Error()) } return diff --git a/vendor/gopkg.in/check.v1/benchmark.go b/vendor/gopkg.in/check.v1/benchmark.go index b2d351948d..c27f1251a6 100644 --- a/vendor/gopkg.in/check.v1/benchmark.go +++ b/vendor/gopkg.in/check.v1/benchmark.go @@ -1,5 +1,5 @@ // Copyright (c) 2012 The Go Authors. All rights reserved. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: