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

TPM2: Add String function for tpm2.Algorithm #232

Merged
merged 1 commit into from
Jan 20, 2021
Merged

Conversation

ChriMarMe
Copy link
Collaborator

Add String function for tpm2.Algorithm to brighten everyones parsing experience

Signed-off-by: Christopher Meis christopher.meis@9elements.com

@ChriMarMe ChriMarMe requested a review from a team as a code owner January 18, 2021 15:47
Copy link
Contributor

@twitchy-jsonp twitchy-jsonp left a comment

Choose a reason for hiding this comment

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

Can you make the implementation implement Stringer? https://golang.org/pkg/fmt/#Stringer

For the case where the alg is not recognized, can you return something like fmt.Sprintf("Alg?<%d>", int(a)) ?

Not ideal, but better than the empty string imo.

…experience

Signed-off-by: Christopher Meis <christopher.meis@9elements.com>
Copy link
Contributor

@twitchy-jsonp twitchy-jsonp left a comment

Choose a reason for hiding this comment

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

My parsing experience is indeed brightened. Thanks!

@twitchy-jsonp twitchy-jsonp merged commit 1ff48da into master Jan 20, 2021
@ChriMarMe ChriMarMe deleted the tpm2/AlgString branch January 21, 2021 04:28
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.

2 participants