From 7ec3d5ac6d73602d223a7684ae44da69f3084ced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Wed, 28 Oct 2020 22:21:31 +0100 Subject: [PATCH] add nolint. --- cmd/root.go | 1 + internal/http/endpoint/endpoint.go | 1 + internal/xorg/xorg.go | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/cmd/root.go b/cmd/root.go index 6364bc7d..78af80df 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -52,6 +52,7 @@ func init() { } if _, err := os.Stat(logs); os.IsNotExist(err) { + //nolint os.Mkdir(logs, os.ModePerm) } diff --git a/internal/http/endpoint/endpoint.go b/internal/http/endpoint/endpoint.go index b6734be7..92a29424 100644 --- a/internal/http/endpoint/endpoint.go +++ b/internal/http/endpoint/endpoint.go @@ -41,6 +41,7 @@ func errResponse(input interface{}) *ErrResponse { var res *ErrResponse var err interface{} + //nolint switch input.(type) { case *HandlerError: e := input.(*HandlerError) diff --git a/internal/xorg/xorg.go b/internal/xorg/xorg.go index ec5d0727..ebe25baf 100644 --- a/internal/xorg/xorg.go +++ b/internal/xorg/xorg.go @@ -130,11 +130,13 @@ func WriteClipboard(data string) { func ResetKeys() { for code := range debounce_button { + //nolint ButtonUp(code) delete(debounce_button, code) } for code := range debounce_key { + //nolint KeyUp(code) delete(debounce_key, code) @@ -147,6 +149,7 @@ func CheckKeys(duration time.Duration) { if t.Sub(start) < duration { continue } + //nolint ButtonUp(code) delete(debounce_button, code) @@ -155,6 +158,7 @@ func CheckKeys(duration time.Duration) { if t.Sub(start) < duration { continue } + //nolint KeyUp(code) delete(debounce_key, code)