@@ -14,7 +14,7 @@ import (
1414// name and ID (GUID), which should always have a 1:1 mapping to each other
1515// (e.g. don't use multiple provider names with the same ID, or vice versa).
1616type Provider struct {
17- ID * guid.GUID
17+ ID guid.GUID
1818 handle providerHandle
1919 metadata []byte
2020 callback EnableCallback
@@ -61,9 +61,9 @@ const (
6161
6262// EnableCallback is the form of the callback function that receives provider
6363// enable/disable notifications from ETW.
64- type EnableCallback func (* guid.GUID , ProviderState , Level , uint64 , uint64 , uintptr )
64+ type EnableCallback func (guid.GUID , ProviderState , Level , uint64 , uint64 , uintptr )
6565
66- func providerCallback (sourceID * guid.GUID , state ProviderState , level Level , matchAnyKeyword uint64 , matchAllKeyword uint64 , filterData uintptr , i uintptr ) {
66+ func providerCallback (sourceID guid.GUID , state ProviderState , level Level , matchAnyKeyword uint64 , matchAllKeyword uint64 , filterData uintptr , i uintptr ) {
6767 provider := providers .getProvider (uint (i ))
6868
6969 switch state {
@@ -86,7 +86,7 @@ func providerCallback(sourceID *guid.GUID, state ProviderState, level Level, mat
8686// different size, it has only pointer-sized arguments, which are then cast to
8787// the appropriate types when calling providerCallback.
8888func providerCallbackAdapter (sourceID * guid.GUID , state uintptr , level uintptr , matchAnyKeyword uintptr , matchAllKeyword uintptr , filterData uintptr , i uintptr ) uintptr {
89- providerCallback (sourceID , ProviderState (state ), Level (level ), uint64 (matchAnyKeyword ), uint64 (matchAllKeyword ), filterData , i )
89+ providerCallback (* sourceID , ProviderState (state ), Level (level ), uint64 (matchAnyKeyword ), uint64 (matchAllKeyword ), filterData , i )
9090 return 0
9191}
9292
@@ -97,7 +97,7 @@ func providerCallbackAdapter(sourceID *guid.GUID, state uintptr, level uintptr,
9797// The algorithm is roughly:
9898// Hash = Sha1(namespace + arg.ToUpper().ToUtf16be())
9999// Guid = Hash[0..15], with Hash[7] tweaked according to RFC 4122
100- func providerIDFromName (name string ) * guid.GUID {
100+ func providerIDFromName (name string ) guid.GUID {
101101 buffer := sha1 .New ()
102102
103103 namespace := []byte {0x48 , 0x2C , 0x2D , 0xB2 , 0xC3 , 0x90 , 0x47 , 0xC8 , 0x87 , 0xF8 , 0x1A , 0x15 , 0xBF , 0xC1 , 0x30 , 0xFB }
@@ -108,7 +108,7 @@ func providerIDFromName(name string) *guid.GUID {
108108 sum := buffer .Sum (nil )
109109 sum [7 ] = (sum [7 ] & 0xf ) | 0x50
110110
111- return & guid.GUID {
111+ return guid.GUID {
112112 Data1 : binary .LittleEndian .Uint32 (sum [0 :4 ]),
113113 Data2 : binary .LittleEndian .Uint16 (sum [4 :6 ]),
114114 Data3 : binary .LittleEndian .Uint16 (sum [6 :8 ]),
@@ -219,8 +219,8 @@ func (provider *Provider) WriteEvent(name string, eventOpts []EventOpt, fieldOpt
219219// the ETW infrastructure.
220220func (provider * Provider ) writeEventRaw (
221221 descriptor * eventDescriptor ,
222- activityID * guid.GUID ,
223- relatedActivityID * guid.GUID ,
222+ activityID guid.GUID ,
223+ relatedActivityID guid.GUID ,
224224 metadataBlobs [][]byte ,
225225 dataBlobs [][]byte ) error {
226226
@@ -235,5 +235,5 @@ func (provider *Provider) writeEventRaw(
235235 dataDescriptors = append (dataDescriptors , newEventDataDescriptor (eventDataDescriptorTypeUserData , blob ))
236236 }
237237
238- return eventWriteTransfer (provider .handle , descriptor , (* windows .GUID )(activityID ), (* windows .GUID )(relatedActivityID ), dataDescriptorCount , & dataDescriptors [0 ])
238+ return eventWriteTransfer (provider .handle , descriptor , (* windows .GUID )(& activityID ), (* windows .GUID )(& relatedActivityID ), dataDescriptorCount , & dataDescriptors [0 ])
239239}
0 commit comments