diff --git a/go.mod b/go.mod index 64058e1..9839130 100644 --- a/go.mod +++ b/go.mod @@ -7,12 +7,12 @@ require ( github.com/go-ole/go-ole v1.2.4 // indirect github.com/lxn/win v0.0.0-20190311093451-0040366d7450 github.com/otiai10/gosseract v2.2.1+incompatible - github.com/robotn/gohook v0.0.0-20190315174547-bc414970f3d6 + github.com/robotn/gohook v0.0.0-20190413172657-5b9ae1915c78 github.com/shirou/gopsutil v2.18.12+incompatible // github.com/shirou/gopsutil v0.0.0-20190131151121-071446942108 // indirect github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 // indirect github.com/vcaesar/imgo v0.0.0-20181209162409-13af122cf2fa - github.com/vcaesar/tt v0.0.0-20181224161634-976c3d851647 + github.com/vcaesar/tt v0.0.0-20190311143935-d2abd51da7af golang.org/x/image v0.0.0-20190321063152-3fc05d484e9f golang.org/x/sys v0.0.0-20190412213103-97732733099d // indirect ) diff --git a/go.sum b/go.sum index a2609a9..b965bd9 100644 --- a/go.sum +++ b/go.sum @@ -14,8 +14,8 @@ github.com/lxn/win v0.0.0-20190311093451-0040366d7450 h1:jB6Qj4k3jLhRQ7QxW6aycyL github.com/lxn/win v0.0.0-20190311093451-0040366d7450/go.mod h1:jACzEp9RV7NhfPJQkiCNTteU4nkZZVlvkNpYtVOZPfE= github.com/otiai10/gosseract v2.2.1+incompatible h1:Ry5ltVdpdp4LAa2bMjsSJH34XHVOV7XMi41HtzL8X2I= github.com/otiai10/gosseract v2.2.1+incompatible/go.mod h1:XrzWItCzCpFRZ35n3YtVTgq5bLAhFIkascoRo8G32QE= -github.com/robotn/gohook v0.0.0-20190315174547-bc414970f3d6 h1:XTKPqoPYwgasmAWhtpolldqBpnbpgH6iAtQPReXiywA= -github.com/robotn/gohook v0.0.0-20190315174547-bc414970f3d6/go.mod h1:YD5RyCnUEY2xqtkkgeQVZ31UAfAnVPwUxpTE5cwSXg4= +github.com/robotn/gohook v0.0.0-20190413172657-5b9ae1915c78 h1:eQiF6mZ6ThSrUbFPev8VsTjDPYp8XN7DBfSOa4mAf/k= +github.com/robotn/gohook v0.0.0-20190413172657-5b9ae1915c78/go.mod h1:YD5RyCnUEY2xqtkkgeQVZ31UAfAnVPwUxpTE5cwSXg4= github.com/shirou/gopsutil v0.0.0-20190131151121-071446942108 h1:XXgDK65TPH+Qbo2sdYHldM5avclwThBXVYZHxroFkTQ= github.com/shirou/gopsutil v0.0.0-20190131151121-071446942108/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v2.18.12+incompatible h1:1eaJvGomDnH74/5cF4CTmTbLHAriGFsTZppLXDX93OM= @@ -24,9 +24,11 @@ github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 h1:udFKJ0aHUL60LboW/A+D github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= github.com/vcaesar/imgo v0.0.0-20181209162409-13af122cf2fa h1:kOg2u5TN+l2IBl4Q0Xm3bZRQ5gK3zGXRi/24XT8L7FI= github.com/vcaesar/imgo v0.0.0-20181209162409-13af122cf2fa/go.mod h1:D+Ywq+8bsOIg4nUk1lgHtPGxYxknhySi/HfZjG7VN/g= -github.com/vcaesar/tt v0.0.0-20181224161634-976c3d851647 h1:6dJAca4/AgJ2XwHYUQVAr09rDxggPlz84noyhjZuMbc= -github.com/vcaesar/tt v0.0.0-20181224161634-976c3d851647/go.mod h1:xKkGp+ufbz/1DQmNxdbAMFqZJOVIJEX7dGvLZMhPIWg= +github.com/vcaesar/tt v0.0.0-20190311143935-d2abd51da7af/go.mod h1:xKkGp+ufbz/1DQmNxdbAMFqZJOVIJEX7dGvLZMhPIWg= +golang.org/x/image v0.0.0-20181116024801-cd38e8056d9b/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190321063152-3fc05d484e9f h1:FO4MZ3N56GnxbqxGKqh+YTzUWQ2sDwtFQEZgLOxh9Jc= golang.org/x/image v0.0.0-20190321063152-3fc05d484e9f/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/vendor/github.com/robotn/gohook/.gitignore b/vendor/github.com/robotn/gohook/.gitignore index e22c771..6d4051e 100644 --- a/vendor/github.com/robotn/gohook/.gitignore +++ b/vendor/github.com/robotn/gohook/.gitignore @@ -1,3 +1,8 @@ +# Object files +.DS_Store +.vscode +.idea + # Compiled Object files, Static and Dynamic libs (Shared Objects) *.o *.a diff --git a/vendor/github.com/robotn/gohook/appveyor.yml b/vendor/github.com/robotn/gohook/appveyor.yml index 43c8bc8..6f90e2c 100644 --- a/vendor/github.com/robotn/gohook/appveyor.yml +++ b/vendor/github.com/robotn/gohook/appveyor.yml @@ -34,7 +34,7 @@ environment: PATH: C:\msys64\mingw32\bin\;C:\Program Files (x86)\NSIS\;%PATH% # - COMPILER: MINGW_W64 # ARCHITECTURE: x64 - GOVERSION: 1.12 + GOVERSION: 1.12.1 # GOPATH: c:\gopath # scripts that run after cloning repository diff --git a/vendor/github.com/robotn/gohook/hook.go b/vendor/github.com/robotn/gohook/hook.go index ad29a47..6bd612f 100644 --- a/vendor/github.com/robotn/gohook/hook.go +++ b/vendor/github.com/robotn/gohook/hook.go @@ -20,7 +20,6 @@ package hook //#cgo windows LDFLAGS: -lgdi32 -luser32 #include "event/goEvent.h" - */ import "C" diff --git a/vendor/github.com/vcaesar/tt/.travis.yml b/vendor/github.com/vcaesar/tt/.travis.yml index b7f2269..524f956 100644 --- a/vendor/github.com/vcaesar/tt/.travis.yml +++ b/vendor/github.com/vcaesar/tt/.travis.yml @@ -4,9 +4,10 @@ go_import_path: github.com/vcaesar/tt go: # - 1.8.x - - 1.9.x - - 1.10.x + # - 1.9.x + # - 1.10.x - 1.11.x + - 1.12.x # - tip install: diff --git a/vendor/github.com/vcaesar/tt/appveyor.yml b/vendor/github.com/vcaesar/tt/appveyor.yml index 2475377..9b03948 100644 --- a/vendor/github.com/vcaesar/tt/appveyor.yml +++ b/vendor/github.com/vcaesar/tt/appveyor.yml @@ -12,7 +12,7 @@ environment: matrix: - GOARCH: amd64 # - GOARCH: 386 - GOVERSION: 1.11.4 + GOVERSION: 1.12 # GOPATH: c:\gopath install: diff --git a/vendor/github.com/vcaesar/tt/tt.go b/vendor/github.com/vcaesar/tt/tt.go index 95a6170..3c94734 100644 --- a/vendor/github.com/vcaesar/tt/tt.go +++ b/vendor/github.com/vcaesar/tt/tt.go @@ -18,13 +18,44 @@ package tt import ( "fmt" + "log" "runtime" "strings" "testing" + "time" "unicode" + + "net/http" + _ "net/http/pprof" "unicode/utf8" ) +// Pprof use: +// Mem: +// pprof -http=:8090 http://127.0.0.1:6060/debug/pprof/heap +// +// go tool pprof http://localhost:6060/debug/pprof/heap +// +// CPU: +// debug/pprof/profile +// set time: +// debug/pprof/profile\?seconds\=10 +// pprof -http=:8090 http://127.0.0.1:6060/debug/pprof/profile\?seconds\=10 +// +// debug/pprof/block +// debug/pprof/mutex +func Pprof(tm ...int) bool { + go func() { + log.Println(http.ListenAndServe("127.0.0.1:6060", nil)) + }() + + if len(tm) > 0 { + time.Sleep(time.Duration(tm[0]) * time.Second) + } + + return true +} + // TestingT is an interface wrapper around *testing.T type TestingT interface { Errorf(format string, args ...interface{}) @@ -69,15 +100,14 @@ func isTest(name, prefix string) bool { // CallerInfo returns an array of strings containing the file and line number // of each stack frame leading from the current test to the assert call that // failed. -func CallerInfo() []string { +func CallerInfo() (callers []string) { + var ( + pc uintptr + file, name string + line int + ok bool + ) - pc := uintptr(0) - file := "" - line := 0 - ok := false - name := "" - - callers := []string{} for i := 0; ; i++ { pc, file, line, ok = runtime.Caller(i) if !ok { @@ -126,7 +156,7 @@ func CallerInfo() []string { } } - return callers + return } // BM func Benchmark1(b *testing.B, fn func()) diff --git a/vendor/modules.txt b/vendor/modules.txt index d19fa98..8d86796 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -17,7 +17,7 @@ github.com/go-ole/go-ole/oleutil github.com/lxn/win # github.com/otiai10/gosseract v2.2.1+incompatible github.com/otiai10/gosseract -# github.com/robotn/gohook v0.0.0-20190315174547-bc414970f3d6 +# github.com/robotn/gohook v0.0.0-20190413172657-5b9ae1915c78 github.com/robotn/gohook # github.com/shirou/gopsutil v2.18.12+incompatible github.com/shirou/gopsutil/process @@ -30,7 +30,7 @@ github.com/shirou/gopsutil/net github.com/shirou/w32 # github.com/vcaesar/imgo v0.0.0-20181209162409-13af122cf2fa github.com/vcaesar/imgo -# github.com/vcaesar/tt v0.0.0-20181224161634-976c3d851647 +# github.com/vcaesar/tt v0.0.0-20190311143935-d2abd51da7af github.com/vcaesar/tt # golang.org/x/image v0.0.0-20190321063152-3fc05d484e9f golang.org/x/image/bmp