Files
Amit fd34511314 Switch to Go 1.23 and fix CI failures
Some new upcoming changes require us to use Go 1.23. However, if we switch to Go 1.23 some
new linter errors are showing up. This commit fixes most of the errors and adds an
exclusion for integer overflow errors.

Signed-off-by: Amit <ambarve@microsoft.com>
2025-10-27 09:08:22 -07:00

28 lines
565 B
Go

//go:build windows
package main
import (
"flag"
"fmt"
"os"
"github.com/Microsoft/go-winio/pkg/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)
}