
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
github.com/bi-zone/wmi
Package wmi provides a WMI Query Language (WQL) interface for Windows Management Instrumentation (WMI) on Windows.
This package uses COM API for WMI therefore it's only usable on the Windows machines.
Package reference is available at https://godoc.org/github.com/bi-zone/wmi
Fork is fully compatibly with the original repo. If not - please open an issue.
New features introduced in fork:
float32
,
string
, bool
, uintptr
and time.Time
IDispatch
objectSWbemServices.Get
+ auto dereference of REF fieldsSWbemServices.ExecNotificationQuery
supportPrint names of the currently running processes
package main
import (
"fmt"
"log"
"github.com/bi-zone/wmi"
)
type win32Process struct {
PID uint32 `wmi:"ProcessId"`
Name string
UserField int `wmi:"-"`
}
func main() {
var dst []win32Process
q := wmi.CreateQueryFrom(&dst, "Win32_Process", "")
fmt.Println(q)
if err := wmi.Query(q, &dst); err != nil {
log.Fatal(err)
}
for _, v := range dst {
fmt.Printf("%6d\t%s\n", v.PID, v.Name)
}
}
A more sophisticated examples are located at in examples
folder.
Using DefaultClient
, SWbemServices
or SWbemServicesConnection
differ in a number
of setup calls doing to perform each query (from the most to the least).
Estimated overhead is shown below:
BenchmarkQuery_DefaultClient 5000 33529798 ns/op
BenchmarkQuery_SWbemServices 5000 32031199 ns/op
BenchmarkQuery_SWbemConnection 5000 30099403 ns/op
You could reproduce the results on your machine running:
go test -run=NONE -bench=Query -benchtime=120s
Project uses semantic versioning for version numbers, which is similar to the version contract of the Go language. Which means that the major version will always maintain backwards compatibility with minor versions. Minor versions will only add new additions and changes. Fixes will always be in patch.
This contract should allow you to upgrade to new minor and patch versions without breakage or modifications to your existing code. Leave a ticket, if there is breakage, so that it could be fixed.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.