From 15567a6a2a6c316885a999e716b00530ea287f96 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 6 Nov 2022 01:41:49 +0100 Subject: [PATCH] remove "os" import os.Getppid() is an alias for syscall.Getppid(), which was already imported, so use it directly instead of the alias. Signed-off-by: Sebastiaan van Stijn --- trap_windows.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/trap_windows.go b/trap_windows.go index a9f5691..0c56880 100644 --- a/trap_windows.go +++ b/trap_windows.go @@ -1,7 +1,6 @@ package mousetrap import ( - "os" "syscall" "unsafe" ) @@ -35,7 +34,7 @@ func getProcessEntry(pid int) (*syscall.ProcessEntry32, error) { // It does not guarantee that the program was run from a terminal. It only can tell you // whether it was launched from explorer.exe func StartedByExplorer() bool { - pe, err := getProcessEntry(os.Getppid()) + pe, err := getProcessEntry(syscall.Getppid()) if err != nil { return false }