diff options
Diffstat (limited to 'src/encoding/binary')
| -rw-r--r-- | src/encoding/binary/example_test.go | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/encoding/binary/example_test.go b/src/encoding/binary/example_test.go index 6f892c2b8d..b994b897ce 100644 --- a/src/encoding/binary/example_test.go +++ b/src/encoding/binary/example_test.go @@ -132,12 +132,12 @@ func ExamplePutVarint() { func ExampleUvarint() { inputs := [][]byte{ - []byte{0x01}, - []byte{0x02}, - []byte{0x7f}, - []byte{0x80, 0x01}, - []byte{0xff, 0x01}, - []byte{0x80, 0x02}, + {0x01}, + {0x02}, + {0x7f}, + {0x80, 0x01}, + {0xff, 0x01}, + {0x80, 0x02}, } for _, b := range inputs { x, n := binary.Uvarint(b) @@ -157,15 +157,15 @@ func ExampleUvarint() { func ExampleVarint() { inputs := [][]byte{ - []byte{0x81, 0x01}, - []byte{0x7f}, - []byte{0x03}, - []byte{0x01}, - []byte{0x00}, - []byte{0x02}, - []byte{0x04}, - []byte{0x7e}, - []byte{0x80, 0x01}, + {0x81, 0x01}, + {0x7f}, + {0x03}, + {0x01}, + {0x00}, + {0x02}, + {0x04}, + {0x7e}, + {0x80, 0x01}, } for _, b := range inputs { x, n := binary.Varint(b) |
