Skip to content
New issue

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

Fix CloudEvent Code in readme (Good First Issue) #34

Closed
bradmccoydev opened this issue Nov 3, 2022 · 2 comments
Closed

Fix CloudEvent Code in readme (Good First Issue) #34

bradmccoydev opened this issue Nov 3, 2022 · 2 comments
Assignees

Comments

@bradmccoydev
Copy link
Member

Currently, the code in README.md does not work for sending as a CloudEvent. I would like to mentor a beginner for this issue so please assign it to me. I have done an example process to get them used to git here they can follow: #33

We need to make the following changes..

  1. Under line 52 add the following to make it easier for folks starting off
go get github.com/cloudevents/sdk-go/v2

2 . line 64 - Change from Sent to Send so it's not in the past tense

  1. Under line 62 - add the following code to create the NewClientHTTP()
c, err := cloudevents.NewClientHTTP()
	if err != nil {
		log.Fatalf("failed to create client, %v", err)
	}
  1. Line 66 add a * in front of ce
	if result := c.Send(ctx, *ce); cloudevents.IsUndelivered(result) {
		log.Fatalf("failed to send, %v", result)
	}
@bradmccoydev
Copy link
Member Author

PR raised: #35

afrittoli pushed a commit that referenced this issue Nov 10, 2022
Fix GoLang errors in README.md for sending cloudevent.

Closes issue: #34

Signed-off-by: Brad McCoy <bradmccoydev@gmail.com>
@bradmccoydev
Copy link
Member Author

merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant