From dbf96a4904eb26e7f1ea9f916852c4bec812c883 Mon Sep 17 00:00:00 2001 From: rupor-github Date: Fri, 20 Aug 2021 17:52:58 -0400 Subject: [PATCH] Linting --- systray/systray_windows.go | 24 +++++++++++++----------- tools/tools.go | 4 ++-- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/systray/systray_windows.go b/systray/systray_windows.go index 7e4ef20..34b7ec2 100644 --- a/systray/systray_windows.go +++ b/systray/systray_windows.go @@ -34,17 +34,18 @@ var ( s32 = windows.NewLazySystemDLL("Shell32.dll") pShellNotifyIcon = s32.NewProc("Shell_NotifyIconW") - u32 = windows.NewLazySystemDLL("User32.dll") - pCreateMenu = u32.NewProc("CreateMenu") - pCreatePopupMenu = u32.NewProc("CreatePopupMenu") - pCreateWindowEx = u32.NewProc("CreateWindowExW") - pDefWindowProc = u32.NewProc("DefWindowProcW") - pDeleteMenu = u32.NewProc("DeleteMenu") - pDestroyWindow = u32.NewProc("DestroyWindow") - pDispatchMessage = u32.NewProc("DispatchMessageW") - pDrawIconEx = u32.NewProc("DrawIconEx") - pGetCursorPos = u32.NewProc("GetCursorPos") - pGetDC = u32.NewProc("GetDC") + u32 = windows.NewLazySystemDLL("User32.dll") + pCreateMenu = u32.NewProc("CreateMenu") + pCreatePopupMenu = u32.NewProc("CreatePopupMenu") + pCreateWindowEx = u32.NewProc("CreateWindowExW") + pDefWindowProc = u32.NewProc("DefWindowProcW") + pDeleteMenu = u32.NewProc("DeleteMenu") + pDestroyWindow = u32.NewProc("DestroyWindow") + pDispatchMessage = u32.NewProc("DispatchMessageW") + pDrawIconEx = u32.NewProc("DrawIconEx") + pGetCursorPos = u32.NewProc("GetCursorPos") + pGetDC = u32.NewProc("GetDC") + //lint:ignore U1000 keep pGetMenuItemID pGetMenuItemID = u32.NewProc("GetMenuItemID") pGetMessage = u32.NewProc("GetMessageW") pGetSystemMetrics = u32.NewProc("GetSystemMetrics") @@ -716,6 +717,7 @@ func (t *winTray) delFromVisibleItems(parent, val uint32) { break } } + t.visibleItems[parent] = visibleItems } func (t *winTray) addToVisibleItems(parent, val uint32) { diff --git a/tools/tools.go b/tools/tools.go index 853ba82..0007af0 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -1,8 +1,8 @@ -// go:build tools +//go:build tools +// +build tools package tools import ( - // To keep go mod happy _ "honnef.co/go/tools/cmd/staticcheck" )