Documentation
¶
Index ¶
- Constants
- Variables
- type Segment
- func (seg *Segment) Complex128(offset int64) *complex128
- func (seg *Segment) Complex64(offset int64) *complex64
- func (seg *Segment) Float32(offset int64) *float32
- func (seg *Segment) Float64(offset int64) *float64
- func (seg *Segment) Int16(offset int64) *int16
- func (seg *Segment) Int32(offset int64) *int32
- func (seg *Segment) Int64(offset int64) *int64
- func (seg *Segment) Int8(offset int64) *int8
- func (seg *Segment) Pointer(offset int64, length uintptr) uintptr
- func (seg *Segment) ScanUint(offset int64, v ...interface{}) error
- func (seg *Segment) Uint16(offset int64) *uint16
- func (seg *Segment) Uint32(offset int64) *uint32
- func (seg *Segment) Uint64(offset int64) *uint64
- func (seg *Segment) Uint8(offset int64) *uint8
Constants ¶
const ( Int8Size = 1 Int16Size = 2 Int32Size = 4 Int64Size = 8 Uint8Size = 1 Uint16Size = 2 Uint32Size = 4 Uint64Size = 8 Float32Size = 4 Float64Size = 8 Complex64Size = 8 Complex128Size = 16 )
Sizes of types in bytes.
const MaxUintptr = ^uintptr(0)
MaxUintptr is the maximum platform dependent unsigned integer large enough to store the uninterpreted bits of a pointer value.
Variables ¶
var ErrBadValue = fmt.Errorf("segment: bad value")
var ErrOutOfBounds = fmt.Errorf("segment: out of bounds")
var Fault = fmt.Errorf("segmentation fault")
Functions ¶
This section is empty.
Types ¶
type Segment ¶
type Segment struct {
// contains filtered or unexported fields
}
Segment is a data segment. See https://golang.org/ref/spec#Numeric_types for details.
func (*Segment) Complex128 ¶
func (seg *Segment) Complex128(offset int64) *complex128
Complex128 returns a pointer to the complex number with float64 real and imaginary parts from this segment or panics at the access violation.
func (*Segment) Complex64 ¶
Complex64 returns a pointer to the complex number with float32 real and imaginary parts from this segment or panics at the access violation.
func (*Segment) Float32 ¶
Float32 returns a pointer to the IEEE-754 32-bit floating-point number from this segment or panics at the access violation.
func (*Segment) Float64 ¶
Float64 returns a pointer to the IEEE-754 64-bit floating-point number from this segment or panics at the access violation.
func (*Segment) Int16 ¶
Int16 returns a pointer to the signed 16-bit integer from this segment or panics at the access violation.
func (*Segment) Int32 ¶
Int32 returns a pointer to the signed 32-bit integer from this segment or panics at the access violation.
func (*Segment) Int64 ¶
Int64 returns a pointer to the signed 64-bit integer from this segment or panics at the access violation.
func (*Segment) Int8 ¶
Int8 returns a pointer to the signed 8-bit integer from this segment or panics at the access violation.
func (*Segment) Pointer ¶
Pointer returns an untyped pointer to the value from this segment or panics at the access violation.
func (*Segment) ScanUint ¶
ScanUint sequentially reads the data into the unsigned integers pointed by v starting from the given offset.
func (*Segment) Uint16 ¶
Uint16 returns a pointer to the unsigned 16-bit integer from this segment or panics at the access violation.
func (*Segment) Uint32 ¶
Uint32 returns a pointer to the unsigned 32-bit integer from this segment or panics at the access violation.