LGTM On Fri, Aug 9, 2013 at 3:54 PM, <r@golang.org> wrote: > Reviewers: bradfitz, > ...
11 years, 7 months ago
(2013-08-09 23:01:50 UTC)
#2
LGTM
On Fri, Aug 9, 2013 at 3:54 PM, <r@golang.org> wrote:
> Reviewers: bradfitz,
>
> Message:
> Hello bradfitz (cc: golang-dev@googlegroups.com),
>
> I'd like you to review this change to
> https://code.google.com/p/go/
>
>
> Description:
> encoding/binary: better description for intReadSize
> It used to be called intDestSize; the new name is better too.
>
> Please review this at
https://codereview.appspot.**com/12713043/<https://codereview.appspot.com/127...
>
> Affected files:
> M src/pkg/encoding/binary/**binary.go
>
>
> Index: src/pkg/encoding/binary/**binary.go
> ==============================**==============================**=======
> --- a/src/pkg/encoding/binary/**binary.go
> +++ b/src/pkg/encoding/binary/**binary.go
> @@ -135,7 +135,7 @@
> // may be used for padding.
> func Read(r io.Reader, order ByteOrder, data interface{}) error {
> // Fast path for basic types and slices.
> - if n := intDestSize(data); n != 0 {
> + if n := intReadSize(data); n != 0 {
> var b [8]byte
> var bs []byte
> if n > len(b) {
> @@ -609,8 +609,9 @@
> e.buf = e.buf[n:]
> }
>
> -// intDestSize returns the size of the data required to represent the
> data when encoded.
> -func intDestSize(data interface{}) int {
> +// intReadSize returns the size of the data required to represent the
> data when encoded.
> +// It returns zero if the type cannot be implemented by the fast path in
> Read.
> +func intReadSize(data interface{}) int {
> switch data := data.(type) {
> case *int8, *uint8:
> return 1
>
>
>
*** Submitted as https://code.google.com/p/go/source/detail?r=d70c9a6579ca *** encoding/binary: better description for intReadSize It used to be called ...
11 years, 7 months ago
(2013-08-09 23:12:11 UTC)
#3
Issue 12713043: code review 12713043: encoding/binary: better description for intReadSize
(Closed)
Created 11 years, 7 months ago by r
Modified 11 years, 7 months ago
Reviewers:
Base URL:
Comments: 0