Add basic Go ETW implementation

This commit is contained in:
Kevin Parsons
2018-12-12 16:05:33 -08:00
parent 97e4973ce5
commit 899181905d
8 changed files with 407 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
package etw
import (
"bytes"
"encoding/binary"
)
type EventData struct {
buffer bytes.Buffer
}
func (ed *EventData) AddString(data string) {
binary.Write(&ed.buffer, binary.LittleEndian, []byte(data))
binary.Write(&ed.buffer, binary.LittleEndian, byte(0))
}