From b01180b913b95418f018b56a8cfdc7f0508d88a1 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Mon, 4 Jun 2018 14:29:43 +0200 Subject: [PATCH] fix lint warnings --- app/proxyman/inbound/always.go | 2 ++ common/log/logger.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/proxyman/inbound/always.go b/app/proxyman/inbound/always.go index 310444bda..964df990b 100644 --- a/app/proxyman/inbound/always.go +++ b/app/proxyman/inbound/always.go @@ -104,6 +104,7 @@ func NewAlwaysOnInboundHandler(ctx context.Context, tag string, receiverConfig * return h, nil } +// Start implements common.Runnable. func (h *AlwaysOnInboundHandler) Start() error { for _, worker := range h.workers { if err := worker.Start(); err != nil { @@ -113,6 +114,7 @@ func (h *AlwaysOnInboundHandler) Start() error { return nil } +// Close implements common.Closable. func (h *AlwaysOnInboundHandler) Close() error { var errors []interface{} for _, worker := range h.workers { diff --git a/common/log/logger.go b/common/log/logger.go index bb18b0119..9a2591cb9 100644 --- a/common/log/logger.go +++ b/common/log/logger.go @@ -48,14 +48,14 @@ func (l *generalLogger) run() { if logger == nil { return } - defer logger.Close() + defer logger.Close() // nolint: errcheck for { select { case <-l.done.Wait(): return case msg := <-l.buffer: - logger.Write(msg.String() + platform.LineSeparator()) + logger.Write(msg.String() + platform.LineSeparator()) // nolint: errcheck dataWritten = true case <-ticker.C: if !dataWritten {