Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
lint windows
Michael Yange919f6811f79
diff --git a/app/lifecycle/server_windows.go b/app/lifecycle/server_windows.goindex cd4244ff9..5f9fe1246 100644--- a/app/lifecycle/server_windows.go+++ b/app/lifecycle/server_windows.go@@ -24,7 +24,8 @@ func terminate(cmd *exec.Cmd) error {if err != nil {return err}- defer dll.Release() // nolint: errcheck+ //nolint:errcheck+ defer dll.Release()pid := cmd.Process.Pid@@ -73,7 +74,8 @@ func isProcessExited(pid int) (bool, error) {if err != nil {return false, fmt.Errorf("failed to open process: %v", err)}- defer windows.CloseHandle(hProcess) // nolint: errcheck+ //nolint:errcheck+ defer windows.CloseHandle(hProcess)var exitCode uint32err = windows.GetExitCodeProcess(hProcess, &exitCode)diff --git a/app/tray/wintray/eventloop.go b/app/tray/wintray/eventloop.goindex a0af97873..0f9448947 100644--- a/app/tray/wintray/eventloop.go+++ b/app/tray/wintray/eventloop.go@@ -47,7 +47,6 @@ func nativeLoop() {default:pTranslateMessage.Call(uintptr(unsafe.Pointer(m))) //nolint:errcheckpDispatchMessage.Call(uintptr(unsafe.Pointer(m))) //nolint:errcheck-}}}@@ -160,8 +159,8 @@ func (t *winTray) wndProc(hWnd windows.Handle, message uint32, wParam, lParam uilResult, _, _ = pDefWindowProc.Call(uintptr(hWnd),uintptr(message),- uintptr(wParam),- uintptr(lParam),+ wParam,+ lParam,)}returndiff --git a/app/tray/wintray/tray.go b/app/tray/wintray/tray.goindex 69d4487de..027ec5a50 100644--- a/app/tray/wintray/tray.go+++ b/app/tray/wintray/tray.go@@ -186,7 +186,7 @@ func (t *winTray) initInstance() error {t.muNID.Lock()defer t.muNID.Unlock()t.nid = ¬ifyIconData{- Wnd: windows.Handle(t.window),+ Wnd: t.window,ID: 100,Flags: NIF_MESSAGE,CallbackMessage: t.wmSystrayMessage,@@ -197,7 +197,6 @@ func (t *winTray) initInstance() error {}func (t *winTray) createMenu() error {-menuHandle, _, err := pCreatePopupMenu.Call()if menuHandle == 0 {return err@@ -246,7 +245,7 @@ func (t *winTray) addOrUpdateMenuItem(menuItemId uint32, parentId uint32, titlemi := menuItemInfo{Mask: MIIM_FTYPE | MIIM_STRING | MIIM_ID | MIIM_STATE,Type: MFT_STRING,- ID: uint32(menuItemId),+ ID: menuItemId,TypeData: titlePtr,Cch: uint32(len(title)),}@@ -302,11 +301,10 @@ func (t *winTray) addOrUpdateMenuItem(menuItemId uint32, parentId uint32, title}func (t *winTray) addSeparatorMenuItem(menuItemId, parentId uint32) error {-mi := menuItemInfo{Mask: MIIM_FTYPE | MIIM_ID | MIIM_STATE,Type: MFT_SEPARATOR,- ID: uint32(menuItemId),+ ID: menuItemId,}mi.Size = uint32(unsafe.Sizeof(mi))@@ -426,7 +424,6 @@ func iconBytesToFilePath(iconBytes []byte) (string, error) {// Loads an image from file and shows it in tray.// Shell_NotifyIcon: https://msdn.microsoft.com/en-us/library/windows/desktop/bb762159(v=vs.85).aspxfunc (t *winTray) setIcon(src string) error {-h, err := t.loadIconFrom(src)if err != nil {return err@@ -444,7 +441,6 @@ func (t *winTray) setIcon(src string) error {// Loads an image from file to be shown in tray or menu item.// LoadImage: https://msdn.microsoft.com/en-us/library/windows/desktop/ms648045(v=vs.85).aspxfunc (t *winTray) loadIconFrom(src string) (windows.Handle, error) {-// Save and reuse handles of loaded imagest.muLoadedImages.RLock()h, ok := t.loadedImages[src]diff --git a/gpu/amd_windows.go b/gpu/amd_windows.goindex aae6c5b7a..987b543be 100644--- a/gpu/amd_windows.go+++ b/gpu/amd_windows.go@@ -65,7 +65,7 @@ func AMDGetGPUInfo() []GpuInfo {slog.Debug("detected hip devices", "count", count)// TODO how to determine the underlying device ID when visible devices is causing this to subset?- for i := 0; i < count; i++ {+ for i := range count {err = hl.HipSetDevice(i)if err != nil {slog.Warn("set device", "id", i, "error", err)