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

Adds short tutorial to readme and simple example, improves package docs #98

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

EthanHeilman
Copy link
Member

@EthanHeilman EthanHeilman commented Feb 6, 2024

This PR is written to address and close #78 by adding a short "Getting Started" tutorial to the readme.

  • To support this tutorial this PR also adds a very simple signing and verifying example and improves package docs on functions used in the tutorial.

  • This PR also cleans up most of the markdown warnings in the README and adds typ claim to the commitment

This simple example will likely slowly replace the google example. Future work is to merge the Google example with the X509 example to create a general purpose signing utility. The creation this signing utility will be done in a future PR and will not be done in this PR.

* Adds simple example

* Adds relevant package docs
Copy link
Contributor

@whalelines whalelines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the godoc comments.

README.md Outdated
Next we create the OpenPubkey client and call `opkClient.Auth`:
```golang
opkClient, err := client.New(op)
pkt, err := opkClient.Auth(context.TODO())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should some comment be made about context.TODO()?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you suggest?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is it and why is it called TODO? What is to be done?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed this to use context.Background() instead. I want to get developers up and running with requiring that make as few choices as possible. context.TODO() implies that should replace the context with something else. Instead I'd rather give them a sane default.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed

Copy link
Contributor

@whalelines whalelines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@EthanHeilman EthanHeilman merged commit 19e70ad into openpubkey:main Feb 8, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

Short docs on how to use OpenPubkey library
2 participants