File tree 1 file changed +2
-6
lines changed
1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -29,17 +29,13 @@ type ByteOrder interface {
29
29
String () string
30
30
}
31
31
32
- // This is byte instead of struct{} so that it can be compared,
33
- // allowing, e.g., order == binary.LittleEndian.
34
- type unused byte
35
-
36
32
// LittleEndian is the little-endian implementation of ByteOrder.
37
33
var LittleEndian littleEndian
38
34
39
35
// BigEndian is the big-endian implementation of ByteOrder.
40
36
var BigEndian bigEndian
41
37
42
- type littleEndian unused
38
+ type littleEndian struct {}
43
39
44
40
func (littleEndian ) Uint16 (b []byte ) uint16 { return uint16 (b [0 ]) | uint16 (b [1 ])<< 8 }
45
41
@@ -79,7 +75,7 @@ func (littleEndian) String() string { return "LittleEndian" }
79
75
80
76
func (littleEndian ) GoString () string { return "binary.LittleEndian" }
81
77
82
- type bigEndian unused
78
+ type bigEndian struct {}
83
79
84
80
func (bigEndian ) Uint16 (b []byte ) uint16 { return uint16 (b [1 ]) | uint16 (b [0 ])<< 8 }
85
81
You can’t perform that action at this time.
0 commit comments