MCPcopy
hub / github.com/gogf/gf / LeEncodeInt

Function LeEncodeInt

encoding/gbinary/gbinary_le.go:114–124  ·  view source on GitHub ↗
(i int)

Source from the content-addressed store, hash-verified

112}
113
114func LeEncodeInt(i int) []byte {
115 if i <= math.MaxInt8 {
116 return EncodeInt8(int8(i))
117 } else if i <= math.MaxInt16 {
118 return EncodeInt16(int16(i))
119 } else if i <= math.MaxInt32 {
120 return EncodeInt32(int32(i))
121 } else {
122 return EncodeInt64(int64(i))
123 }
124}
125
126func LeEncodeUint(i uint) []byte {
127 if i <= math.MaxUint8 {

Callers 2

LeEncodeFunction · 0.85
EncodeIntFunction · 0.85

Calls 4

EncodeInt8Function · 0.85
EncodeInt16Function · 0.85
EncodeInt32Function · 0.85
EncodeInt64Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…