-
-
Notifications
You must be signed in to change notification settings - Fork 655
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
variable-length-quantity: Decode: don't return/test length (#687)
Since it was introduced in #322, the decode function returns the number of bytes decoded. The creator of the exercise mentioned that it was to be consistent with the standard library's API. Go standard library example for returning number of bytes: https://golang.org/pkg/io/#Writer Now, since #674, it is required that the entire input array be decoded, or else it is an error. Now the number of bytes decoded doesn't make much sense to return, since now it is known that it will always be the length of the input. Go standard library example for not returning number of bytes (decoding everything): https://golang.org/pkg/encoding/json/#Unmarshal testVersion -> 4 Closes #683
- Loading branch information
1 parent
60e7274
commit 44ea27c
Showing
4 changed files
with
7 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters