-
Notifications
You must be signed in to change notification settings - Fork 165
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
Style: improve api clients comments #780
base: master
Are you sure you want to change the base?
Conversation
method is now no longer used anymore, and could be deprecated
@@ -30,6 +30,7 @@ func GenericDecodeBlob(data []byte) ([]byte, error) { | |||
if len(data) <= 32 { | |||
return nil, fmt.Errorf("data is not of length greater than 32 bytes: %d", len(data)) | |||
} | |||
// TODO: why [1]? What's in [0]? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bxue-l2 you prob know this
// TODO: all of these should be private, to prevent users from using them directly, | ||
// which breaks encapsulation and makes it hard for us to do refactors or changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this I personally think is a refactor worth doing... but it might break some client code... :\
if len(data) == 0 { | ||
// TODO: explain when/why/how this can happen | ||
return nil, fmt.Errorf("blob has length zero") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bxue-l2 do you know?
Small improvements to comments/docs for api clients.
Had some fun in the plane while reading the code.
Added some TODOs in a few places which might be worth checking through, perhaps we can solve some of them right away @bxue-l2