mirror of
https://github.com/hanzoai/traces.git
synced 2026-10-30 18:20:41 +00:00
c855109044
Bumps [github.com/twmb/franz-go/pkg/kadm](https://github.com/twmb/franz-go) from 1.16.0 to 1.17.1. - [Changelog](https://github.com/twmb/franz-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/twmb/franz-go/compare/v1.16.0...v1.17.1) --- updated-dependencies: - dependency-name: github.com/twmb/franz-go/pkg/kadm dependency-version: 1.17.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
43 lines
955 B
Go
43 lines
955 B
Go
//go:build !(amd64 || arm64 || ppc64le || riscv64) || nounsafe || purego || appengine
|
|
|
|
package le
|
|
|
|
import (
|
|
"encoding/binary"
|
|
)
|
|
|
|
// Load8 will load from b at index i.
|
|
func Load8[I Indexer](b []byte, i I) byte {
|
|
return b[i]
|
|
}
|
|
|
|
// Load16 will load from b at index i.
|
|
func Load16[I Indexer](b []byte, i I) uint16 {
|
|
return binary.LittleEndian.Uint16(b[i:])
|
|
}
|
|
|
|
// Load32 will load from b at index i.
|
|
func Load32[I Indexer](b []byte, i I) uint32 {
|
|
return binary.LittleEndian.Uint32(b[i:])
|
|
}
|
|
|
|
// Load64 will load from b at index i.
|
|
func Load64[I Indexer](b []byte, i I) uint64 {
|
|
return binary.LittleEndian.Uint64(b[i:])
|
|
}
|
|
|
|
// Store16 will store v at b.
|
|
func Store16(b []byte, v uint16) {
|
|
binary.LittleEndian.PutUint16(b, v)
|
|
}
|
|
|
|
// Store32 will store v at b.
|
|
func Store32(b []byte, v uint32) {
|
|
binary.LittleEndian.PutUint32(b, v)
|
|
}
|
|
|
|
// Store64 will store v at b.
|
|
func Store64[I Indexer](b []byte, i I, v uint64) {
|
|
binary.LittleEndian.PutUint64(b[i:], v)
|
|
}
|