Make etw package internal

This commit is contained in:
Kevin Parsons
2018-12-19 01:52:15 -08:00
parent 32544c5852
commit 824a366a22
8 changed files with 2 additions and 2 deletions
+22
View File
@@ -0,0 +1,22 @@
package etw
import (
"bytes"
)
// EventData maintains a buffer which builds up the data for an ETW event. It
// needs to be paired with EventMetadata which describes the event.
type EventData struct {
buffer bytes.Buffer
}
// NewEventData returns a new EventData with an empty buffer.
func NewEventData() *EventData {
return &EventData{}
}
// AddString appends the data for a string to the end of the buffer.
func (ed *EventData) AddString(data string) {
ed.buffer.Write([]byte(data))
ed.buffer.WriteByte(0)
}