diff options
| author | a1e7cb88 <[email protected]> | 2021-10-18 00:09:23 +0800 |
|---|---|---|
| committer | a1e7cb88 <[email protected]> | 2021-10-18 00:09:23 +0800 |
| commit | 113fd8f700015308e663c8904c95ddf374987b78 (patch) | |
| tree | 0b81a126554c24b298b6e5e038f73beef2494ae9 /cmd/title_windows.go | |
| parent | c0f88cb080950879bc8af5cf498ac3aa8a8c68fb (diff) | |
update mod
Diffstat (limited to 'cmd/title_windows.go')
| -rw-r--r-- | cmd/title_windows.go | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/cmd/title_windows.go b/cmd/title_windows.go deleted file mode 100644 index fc40785..0000000 --- a/cmd/title_windows.go +++ /dev/null @@ -1,21 +0,0 @@ -//go:build windows -package main - -import ( - "syscall" - "unsafe" -) - -func setWindowTitle(title string) { - kernel32, err := syscall.LoadLibrary("kernel32.dll") - if err == nil { - defer syscall.FreeLibrary(kernel32) - setConsoleTitle, err := syscall.GetProcAddress(kernel32, "SetConsoleTitleW") - if err == nil { - ptr, err := syscall.UTF16PtrFromString(title) - if err == nil { - syscall.Syscall(setConsoleTitle, 1, uintptr(unsafe.Pointer(ptr)), 0, 0) - } - } - } -} |
