func WithGroup(group guid.GUID) ProviderOpt {
	return func(opts *providerOpts) {
		opts.group = group
	}
}
WithGroup is used to provide a provider group option to
NewProviderWithOptions
package etw
import (
	"crypto/sha1"
	"encoding/binary"
	"strings"
	"unicode/utf16"
	"github.com/Microsoft/go-winio/pkg/guid"
	"golang.org/x/sys/windows"
)
type Provider struct {
	ID         guid.GUID
	handle     providerHandle
	metadata   []byte
	callback   EnableCallback
	index      uint
	enabled    bool
	level      Level
	keywordAny uint64
	keywordAll uint64
}
func (provider *Provider) String() string {
	if provider == nil {
		return "<nil>"
	}
	return provider.ID.String()
}
type providerHandle uint64
type ProviderState uint32
const (
	ProviderStateDisable ProviderState = iota
	ProviderStateEnable
	ProviderStateCaptureState
)
type eventInfoClass uint32
const (
	eventInfoClassProviderBinaryTrackInfo eventInfoClass = iota
	eventInfoClassProviderSetReserved1
	eventInfoClassProviderSetTraits
	eventInfoClassProviderUseDescriptorType
)
type EnableCallback func(guid.GUID, ProviderState, Level, uint64, uint64, uintptr)
func providerCallback(sourceID guid.GUID, state ProviderState, level Level, matchAnyKeyword uint64, matchAllKeyword uint64, filterData uintptr, i uintptr) {
	provider := providers.getProvider(uint(i))
	switch state {
	case ProviderStateDisable:
		provider.enabled = false
	case ProviderStateEnable:
		provider.enabled = true
		provider.level = level
		provider.keywordAny = matchAnyKeyword
		provider.keywordAll = matchAllKeyword
	}
	if provider.callback != nil {
		provider.callback(sourceID, state, level, matchAnyKeyword, matchAllKeyword, filterData)
	}
}
func providerIDFromName(name string) guid.GUID {
	buffer := sha1.New()
	namespace := guid.GUID{0x482C2DB2, 0xC390, 0x47C8, [8]byte{0x87, 0xF8, 0x1A, 0x15, 0xBF, 0xC1, 0x30, 0xFB}}
	namespaceBytes := namespace.ToArray()
	buffer.Write(namespaceBytes[:])
	binary.Write(buffer, binary.BigEndian, utf16.Encode([]rune(strings.ToUpper(name))))
	sum := buffer.Sum(nil)
	sum[7] = (sum[7] & 0xf) | 0x50
	a := [16]byte{}
	copy(a[:], sum)
	return guid.FromWindowsArray(a)
}
type providerOpts struct {
	callback EnableCallback
	id       guid.GUID
	group    guid.GUID
}
type ProviderOpt func(*providerOpts)
func WithCallback(callback EnableCallback) ProviderOpt {
	return func(opts *providerOpts) {
		opts.callback = callback
	}
}
func WithID(id guid.GUID) ProviderOpt {
	return func(opts *providerOpts) {
		opts.id = id
	}
}