]> Cypherpunks repositories - gostls13.git/commit
encoding/binary: make new example a bit more idiomatic
authorRuss Cox <rsc@golang.org>
Tue, 14 Nov 2017 17:38:11 +0000 (12:38 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 15 Nov 2017 21:26:43 +0000 (21:26 +0000)
commit9232a612fed58d2629073056f827db3fae0cd5f0
tree3a6ac2da9855b38345989f3055bf27601f1e55a1
parent4f6035ae13eba54051e5e46eb3c337b162f400ff
encoding/binary: make new example a bit more idiomatic

Mainly get rid of the weird zero-value struct literal,
but while we're here also group and order things a bit better:
first the reader, then the data, then the call (which takes reader then data).

Change-Id: I901b0661d85d8eaa0807e4482aac66500ca996c7
Reviewed-on: https://go-review.googlesource.com/78118
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
src/encoding/binary/example_test.go