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

bytes.Equal instead of reflect.DeepEqual #167

Open
utdrmac opened this issue Oct 9, 2020 · 1 comment
Open

bytes.Equal instead of reflect.DeepEqual #167

utdrmac opened this issue Oct 9, 2020 · 1 comment

Comments

@utdrmac
Copy link
Contributor

utdrmac commented Oct 9, 2020

https://github.com/goat-systems/go-tezos/blob/master/internal/crypto/crypto.go#L96

This section of code is comparing equality of two byte slices. Is it necessary to use such a bloated package as reflect in this case? Could bytes.Equal() be used instead; especially considering that "bytes" is already included in this package and this is the only use of reflect.

@DefinitelyNotAGoat
Copy link
Collaborator

I will take a look at this when I review the package to make it public.

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

2 participants