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

encoding/binary: varint functions could be better described #19010

Closed
agl opened this issue Feb 9, 2017 · 2 comments
Closed

encoding/binary: varint functions could be better described #19010

agl opened this issue Feb 9, 2017 · 2 comments

Comments

@agl
Copy link
Contributor

agl commented Feb 9, 2017

The comments for the varint functions in encoding/binary don't mention anything about how the integer is encoded. Since there are quite a number of options, it should probably be more clear that it's a little-endian, base128 format.

@griesemer griesemer self-assigned this Feb 9, 2017
@griesemer griesemer added this to the Go1.9 milestone Feb 9, 2017
@cznic
Copy link
Contributor

cznic commented Feb 9, 2017

Package documentation says:

The varint functions encode and decode single integer values using a variable-length encoding; smaller values require fewer bytes. For a specification, see https://developers.google.com/protocol-buffers/docs/encoding.

@dsnet dsnet changed the title encoding/binary varint functions could be better described. encoding/binary: varint functions could be better described Feb 10, 2017
@griesemer
Copy link
Contributor

@cznic Thanks for the hint. I agree, that seems good enough (we don't want to repeat everything for each of the 4 functions, I assume).

@golang golang locked and limited conversation to collaborators Feb 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants