MCPcopy Create free account
hub / github.com/SeeFlowerX/stackplz / IntToBytes

Function IntToBytes

user/util/helper.go:44–49  ·  view source on GitHub ↗
(n int)

Source from the content-addressed store, hash-verified

42}
43
44func IntToBytes(n int) []byte {
45 x := uint32(n)
46 bytesBuffer := bytes.NewBuffer([]byte{})
47 binary.Write(bytesBuffer, binary.LittleEndian, x)
48 return bytesBuffer.Bytes()
49}
50
51func UIntToBytes(x uint32) []byte {
52 bytesBuffer := bytes.NewBuffer([]byte{})

Callers

nothing calls this directly

Calls 1

WriteMethod · 0.65

Tested by

no test coverage detected