Documentation
¶
Index ¶
- type Byteptr
- type Pointer
- func (p *Pointer) Bytes() []byte
- func (p *Pointer) Init(s []byte, offset, len int) *Pointer
- func (p *Pointer) InitStr(s string, offset, len int) *Pointer
- func (p *Pointer) InitString(s string, offset, len int) *Pointer
- func (p *Pointer) Len() int
- func (p *Pointer) Offset() int
- func (p *Pointer) Reset() *Pointer
- func (p *Pointer) SetLen(len int) *Pointer
- func (p *Pointer) SetOffset(offset int) *Pointer
- func (p *Pointer) String() string
- func (p *Pointer) TakeAddr(s []byte) *Pointer
- func (p *Pointer) TakeAddress(s []byte) *Pointer
- func (p *Pointer) TakeStrAddr(s string) *Pointer
- func (p *Pointer) TakeStringAddress(s string) *Pointer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Byteptr ¶
type Byteptr = Pointer
Byteptr is a legacy alias of Pointer. Deprecated: use Pointer instead.
type Pointer ¶ added in v1.0.2
type Pointer struct {
// contains filtered or unexported fields
}
Pointer is a pointer-free representation of bytes/string types.
Similar to reflect.SliceHeader/reflect.StringHeader structs.
func InitStr ¶ added in v1.0.1
InitStr is a deprecated version of InitString. DEPRECATED: use InitString instead.
func InitString ¶ added in v1.0.1
InitString makes new ptr and set up with given params.
func (*Pointer) Bytes ¶ added in v1.0.2
Bytes returns byte sub-slice using offset from previously take address with length len.
func (*Pointer) InitStr ¶ added in v1.0.2
InitStr is a deprecated version of InitString. DEPRECATED: use InitString instead.
func (*Pointer) InitString ¶ added in v1.0.2
InitString ptr with address of the string s and offset/length.
func (*Pointer) TakeAddr ¶ added in v1.0.2
TakeAddr is a deprecated version of TakeAddress. DEPRECATED: use TakeAddress instead.
func (*Pointer) TakeAddress ¶ added in v1.0.2
TakeAddress takes address of underlying byte array of bytes s.
func (*Pointer) TakeStrAddr ¶ added in v1.0.2
TakeStrAddr is a deprecated version of TakeStringAddress. DEPRECATED: use TakeStringAddress instead.
func (*Pointer) TakeStringAddress ¶ added in v1.0.2
TakeStringAddress takes address of underlying byte array of string s.