mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-06 08:43:56 +00:00
update vendor and fix get
This commit is contained in:
parent
82195e5af5
commit
b1d4b3a101
17
vendor/github.com/shirou/gopsutil/internal/common/common_windows.go
generated
vendored
17
vendor/github.com/shirou/gopsutil/internal/common/common_windows.go
generated
vendored
@ -3,8 +3,10 @@
|
|||||||
package common
|
package common
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
|
"github.com/StackExchange/wmi"
|
||||||
"golang.org/x/sys/windows"
|
"golang.org/x/sys/windows"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -110,3 +112,18 @@ func CreateCounter(query windows.Handle, pname, cname string) (*CounterInfo, err
|
|||||||
Counter: counter,
|
Counter: counter,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WMIQueryWithContext - wraps wmi.Query with a timed-out context to avoid hanging
|
||||||
|
func WMIQueryWithContext(ctx context.Context, query string, dst interface{}, connectServerArgs ...interface{}) error {
|
||||||
|
errChan := make(chan error, 1)
|
||||||
|
go func() {
|
||||||
|
errChan <- wmi.Query(query, dst, connectServerArgs...)
|
||||||
|
}()
|
||||||
|
|
||||||
|
select {
|
||||||
|
case <-ctx.Done():
|
||||||
|
return ctx.Err()
|
||||||
|
case err := <-errChan:
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
6
vendor/vendor.json
vendored
6
vendor/vendor.json
vendored
@ -57,10 +57,10 @@
|
|||||||
"revisionTime": "2017-11-12T16:40:41Z"
|
"revisionTime": "2017-11-12T16:40:41Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "p9EXxuL/vV13YRPfgTBA3B/68Vo=",
|
"checksumSHA1": "jWpwWWcywJPNhKTYxi4RXds+amQ=",
|
||||||
"path": "github.com/shirou/gopsutil/internal/common",
|
"path": "github.com/shirou/gopsutil/internal/common",
|
||||||
"revision": "a8bc26299477e53c4ca89f7ec60160a74d4c0890",
|
"revision": "bfe3c2e8f406bf352bc8df81f98c752224867349",
|
||||||
"revisionTime": "2017-11-12T16:40:41Z"
|
"revisionTime": "2017-11-21T12:01:14Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "UuwHornIODuEq7fYnsZwdVgERLk=",
|
"checksumSHA1": "UuwHornIODuEq7fYnsZwdVgERLk=",
|
||||||
|
Loading…
Reference in New Issue
Block a user