Clean up and PR feedback

This commit is contained in:
Kevin Parsons
2019-01-03 13:08:23 -08:00
parent fac5ca0c3a
commit b87cea3696
8 changed files with 168 additions and 177 deletions
+5
View File
@@ -4,6 +4,11 @@ package etw
// Provider.WriteEvent to add fields to the event.
type FieldOpt func(em *EventMetadata, ed *EventData)
// WithFields returns the variadic arguments as a single slice.
func WithFields(opts ...FieldOpt) []FieldOpt {
return opts
}
// StringField adds a single string field to the event.
func StringField(name string, value string) FieldOpt {
return func(em *EventMetadata, ed *EventData) {