EventStore-Client-Go icon indicating copy to clipboard operation
EventStore-Client-Go copied to clipboard

correctness of ContentTypeJson value

Open karthiksedoc opened this issue 1 year ago • 2 comments

Looks like the following:

	eventData := esdb.EventData{
		ContentType: esdb.ContentTypeJson,
		EventType:   "TestEvent",
		Data:        data,
	}

in https://github.com/EventStore/EventStore-Client-Go/blob/c29aa7d3ce9c0aadc7d2bfa3dd060f2865efb227/samples/quickstart.go#L42C21-L42C36 is incorrect , does it have to be int as in below?

https://github.com/EventStore/EventStore-Client-Go/blob/c29aa7d3ce9c0aadc7d2bfa3dd060f2865efb227/esdb/event_data.go#L12

the following code works for me:

	eventData := esdb.EventData {
		ContentType: 1,
		EventType: "TestEvent",
		Data: data,
	}

So, the ContentType: esdb.ContentTypeJson need to be changed to ContentType: 1 ?

karthiksedoc avatar Dec 06 '24 11:12 karthiksedoc