Update github.com/NVIDIA/go-nvlib to v0.3.0

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar
2024-04-18 14:49:21 +02:00
parent 50dd460eaa
commit bbaf543537
32 changed files with 175 additions and 3174 deletions

View File

@@ -21,12 +21,12 @@ import (
"unsafe"
)
// Raw returns just the bytes without any assumptions about layout
// Raw returns just the bytes without any assumptions about layout.
type Raw interface {
Raw() *[]byte
}
// Reader used to read various data sizes in the byte array
// Reader used to read various data sizes in the byte array.
type Reader interface {
Read8(pos int) uint8
Read16(pos int) uint16
@@ -35,7 +35,7 @@ type Reader interface {
Len() int
}
// Writer used to write various sizes of data in the byte array
// Writer used to write various sizes of data in the byte array.
type Writer interface {
Write8(pos int, value uint8)
Write16(pos int, value uint16)
@@ -44,7 +44,7 @@ type Writer interface {
Len() int
}
// Bytes object for manipulating arbitrary byte arrays
// Bytes object for manipulating arbitrary byte arrays.
type Bytes interface {
Raw
Reader
@@ -70,12 +70,12 @@ func init() {
}
}
// New raw bytearray
// New raw bytearray.
func New(data *[]byte) Bytes {
return (*native)(data)
}
// NewLittleEndian little endian ordering of bytes
// NewLittleEndian little endian ordering of bytes.
func NewLittleEndian(data *[]byte) Bytes {
if nativeByteOrder == binary.LittleEndian {
return (*native)(data)
@@ -84,7 +84,7 @@ func NewLittleEndian(data *[]byte) Bytes {
return (*swapbo)(data)
}
// NewBigEndian big endian ordering of bytes
// NewBigEndian big endian ordering of bytes.
func NewBigEndian(data *[]byte) Bytes {
if nativeByteOrder == binary.BigEndian {
return (*native)(data)