mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-24 21:56:36 +00:00
committed by
Calle Pettersson
parent
517cd3b04b
commit
8841091f9c
25
vendor/github.com/Microsoft/go-winio/tools/etw-provider-gen/main.go
generated
vendored
Normal file
25
vendor/github.com/Microsoft/go-winio/tools/etw-provider-gen/main.go
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/Microsoft/go-winio/internal/etw"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var pn = flag.String("provider-name", "", "The human readable ETW provider name to be converted into GUID format")
|
||||
flag.Parse()
|
||||
if pn == nil || *pn == "" {
|
||||
fmt.Fprint(os.Stderr, "--provider-name is required")
|
||||
os.Exit(1)
|
||||
}
|
||||
p, err := etw.NewProvider(*pn, nil)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "failed to convert provider-name: '%s' with err: '%s", *pn, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
defer p.Close()
|
||||
fmt.Fprintf(os.Stdout, "%s", p)
|
||||
}
|
||||
Reference in New Issue
Block a user