We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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?
int
EventStore-Client-Go/esdb/event_data.go
Line 12 in c29aa7d
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 ?
ContentType: esdb.ContentTypeJson
ContentType: 1
The text was updated successfully, but these errors were encountered:
Hey @karthiksedoc,
I'm a bit confused by your question. See esdb.ContentTypeJson is a regular integer as shown at its declaration site.
esdb.ContentTypeJson
https://github.com/EventStore/EventStore-Client-Go/blob/v4.2.0/esdb/event_data.go
So it is normal to be able to use either 1 or esdb.ContentTypeJson.
1
Sorry, something went wrong.
Hey @karthiksedoc, I'm a bit confused by your question. See esdb.ContentTypeJson is a regular integer as shown at its declaration site. https://github.com/EventStore/EventStore-Client-Go/blob/v4.2.0/esdb/event_data.go So it is normal to be able to use either 1 or esdb.ContentTypeJson.
Thanks for getting back to me @YoEight 👍 . I might be not setting it properly:
When I set:
eventData := esdb.EventData { ContentType: esdb.ContentTypeJson, EventType: "TestEvent", Data: data, }
I get the follow:
➜ gorpc_test git:(main) go build main.go # command-line-arguments ./main.go:42:21: undefined: esdb.ContentTypeJson
the build works without error when setting:
I was following the example and encountered this 🙇
No branches or pull requests
Looks like the following:
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?EventStore-Client-Go/esdb/event_data.go
Line 12 in c29aa7d
the following code works for me:
So, the
ContentType: esdb.ContentTypeJson
need to be changed toContentType: 1
?The text was updated successfully, but these errors were encountered: