aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/binary
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2015-03-13 19:36:09 -0700
committerJosh Bleecher Snyder <josharian@gmail.com>2015-03-14 02:51:22 +0000
commitfacd79e4bea28f3ca0bc5dc51c9069fcb0bd9d0f (patch)
tree54e010f63c5e905cc10188f497db9bdab578fceb /src/encoding/binary
parent5158147e24a4626d14971fdda38d71db4a975a04 (diff)
downloadgo-facd79e4bea28f3ca0bc5dc51c9069fcb0bd9d0f.tar.gz
go-facd79e4bea28f3ca0bc5dc51c9069fcb0bd9d0f.zip
encoding/binary: cull dead code
Change-Id: I91f9b5280e08e005f5a891aaa249267c211d814b Reviewed-on: https://go-review.googlesource.com/7592 Reviewed-by: Minux Ma <minux@golang.org>
Diffstat (limited to 'src/encoding/binary')
-rw-r--r--src/encoding/binary/binary.go16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/encoding/binary/binary.go b/src/encoding/binary/binary.go
index 3c37949862..ac15fb7415 100644
--- a/src/encoding/binary/binary.go
+++ b/src/encoding/binary/binary.go
@@ -239,78 +239,62 @@ func Write(w io.Writer, order ByteOrder, data interface{}) error {
}
switch v := data.(type) {
case *int8:
- bs = b[:1]
b[0] = byte(*v)
case int8:
- bs = b[:1]
b[0] = byte(v)
case []int8:
for i, x := range v {
bs[i] = byte(x)
}
case *uint8:
- bs = b[:1]
b[0] = *v
case uint8:
- bs = b[:1]
b[0] = byte(v)
case []uint8:
bs = v
case *int16:
- bs = b[:2]
order.PutUint16(bs, uint16(*v))
case int16:
- bs = b[:2]
order.PutUint16(bs, uint16(v))
case []int16:
for i, x := range v {
order.PutUint16(bs[2*i:], uint16(x))
}
case *uint16:
- bs = b[:2]
order.PutUint16(bs, *v)
case uint16:
- bs = b[:2]
order.PutUint16(bs, v)
case []uint16:
for i, x := range v {
order.PutUint16(bs[2*i:], x)
}
case *int32:
- bs = b[:4]
order.PutUint32(bs, uint32(*v))
case int32:
- bs = b[:4]
order.PutUint32(bs, uint32(v))
case []int32:
for i, x := range v {
order.PutUint32(bs[4*i:], uint32(x))
}
case *uint32:
- bs = b[:4]
order.PutUint32(bs, *v)
case uint32:
- bs = b[:4]
order.PutUint32(bs, v)
case []uint32:
for i, x := range v {
order.PutUint32(bs[4*i:], x)
}
case *int64:
- bs = b[:8]
order.PutUint64(bs, uint64(*v))
case int64:
- bs = b[:8]
order.PutUint64(bs, uint64(v))
case []int64:
for i, x := range v {
order.PutUint64(bs[8*i:], uint64(x))
}
case *uint64:
- bs = b[:8]
order.PutUint64(bs, *v)
case uint64:
- bs = b[:8]
order.PutUint64(bs, v)
case []uint64:
for i, x := range v {