mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
Update github.com/NVIDIA/go-nvlib to v0.3.0
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
14
vendor/github.com/NVIDIA/go-nvlib/pkg/nvpci/bytes/bytes.go
generated
vendored
14
vendor/github.com/NVIDIA/go-nvlib/pkg/nvpci/bytes/bytes.go
generated
vendored
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user