mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-20 06:20:08 +08:00
make lint happy
This commit is contained in:
parent
d85865825e
commit
67a1050df6
2
go.mod
2
go.mod
@ -40,6 +40,7 @@ require (
|
|||||||
github.com/wdvxdr1123/ZeroBot v1.6.9
|
github.com/wdvxdr1123/ZeroBot v1.6.9
|
||||||
gitlab.com/gomidi/midi/v2 v2.0.25
|
gitlab.com/gomidi/midi/v2 v2.0.25
|
||||||
golang.org/x/image v0.3.0
|
golang.org/x/image v0.3.0
|
||||||
|
golang.org/x/sys v0.4.0
|
||||||
golang.org/x/text v0.6.0
|
golang.org/x/text v0.6.0
|
||||||
gopkg.in/yaml.v3 v3.0.1
|
gopkg.in/yaml.v3 v3.0.1
|
||||||
)
|
)
|
||||||
@ -85,7 +86,6 @@ require (
|
|||||||
golang.org/x/mobile v0.0.0-20201217150744-e6ae53a27f4f // indirect
|
golang.org/x/mobile v0.0.0-20201217150744-e6ae53a27f4f // indirect
|
||||||
golang.org/x/mod v0.6.0 // indirect
|
golang.org/x/mod v0.6.0 // indirect
|
||||||
golang.org/x/net v0.4.0 // indirect
|
golang.org/x/net v0.4.0 // indirect
|
||||||
golang.org/x/sys v0.4.0 // indirect
|
|
||||||
golang.org/x/tools v0.2.0 // indirect
|
golang.org/x/tools v0.2.0 // indirect
|
||||||
modernc.org/libc v1.21.5 // indirect
|
modernc.org/libc v1.21.5 // indirect
|
||||||
modernc.org/mathutil v1.5.0 // indirect
|
modernc.org/mathutil v1.5.0 // indirect
|
||||||
|
|||||||
@ -11,15 +11,17 @@ import (
|
|||||||
func init() {
|
func init() {
|
||||||
k32 := windows.NewLazySystemDLL("kernel32.dll")
|
k32 := windows.NewLazySystemDLL("kernel32.dll")
|
||||||
getstdhandle := k32.NewProc("GetStdHandle")
|
getstdhandle := k32.NewProc("GetStdHandle")
|
||||||
h, _, err := getstdhandle.Call(uintptr(0xffffffff_fffffff6)) // STD_INPUT_HANDLE = ((DWORD)-10)
|
magic := -10
|
||||||
|
h, _, err := getstdhandle.Call(uintptr(magic)) // STD_INPUT_HANDLE = ((DWORD)-10)
|
||||||
if int(h) == 0 || int(h) == -1 {
|
if int(h) == 0 || int(h) == -1 {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
magic--
|
||||||
h, _, err = k32.NewProc("SetConsoleMode").Call(h, uintptr(0x02a7)) // 禁用快速编辑
|
h, _, err = k32.NewProc("SetConsoleMode").Call(h, uintptr(0x02a7)) // 禁用快速编辑
|
||||||
if h == 0 {
|
if h == 0 {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
h, _, err = getstdhandle.Call(uintptr(0xffffffff_fffffff5)) // STD_OUTPUT_HANDLE = ((DWORD)-11)
|
h, _, err = getstdhandle.Call(uintptr(magic)) // STD_OUTPUT_HANDLE = ((DWORD)-11)
|
||||||
if int(h) == 0 || int(h) == -1 {
|
if int(h) == 0 || int(h) == -1 {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user