Documentation ¶
Index ¶
- type ByteSlice
- func (b *ByteSlice) Append(a *ByteSlice) *ByteSlice
- func (b *ByteSlice) AppendByte(c byte) *ByteSlice
- func (b *ByteSlice) AppendBytes(a []byte) *ByteSlice
- func (b *ByteSlice) AppendFloat32(f float32, format byte, precision int) *ByteSlice
- func (b *ByteSlice) AppendFloat64(f float64, format byte, precision int) *ByteSlice
- func (b *ByteSlice) AppendGenerics(appenders ...ByteSliceAppender) *ByteSlice
- func (b *ByteSlice) AppendInt(i int) *ByteSlice
- func (b *ByteSlice) AppendInt16(i int16) *ByteSlice
- func (b *ByteSlice) AppendInt32(i int32) *ByteSlice
- func (b *ByteSlice) AppendInt64(i int64) *ByteSlice
- func (b *ByteSlice) AppendInt8(i int8) *ByteSlice
- func (b *ByteSlice) AppendPointer(p uintptr) *ByteSlice
- func (b *ByteSlice) AppendRune(r rune) *ByteSlice
- func (b *ByteSlice) AppendString(s string) *ByteSlice
- func (b ByteSlice) AppendTo(b1 *ByteSlice)
- func (b *ByteSlice) AppendUint(i uint) *ByteSlice
- func (b *ByteSlice) AppendUint16(i uint16) *ByteSlice
- func (b *ByteSlice) AppendUint32(i uint32) *ByteSlice
- func (b *ByteSlice) AppendUint64(i uint64) *ByteSlice
- func (b *ByteSlice) AppendUint8(i uint8) *ByteSlice
- func (b ByteSlice) Bytes() []byte
- func (b ByteSlice) Cap() int
- func (b ByteSlice) Len() int
- func (b ByteSlice) ReadCloser() io.ReadCloser
- func (b ByteSlice) Reader() io.Reader
- func (b *ByteSlice) Reset()
- func (b ByteSlice) String() string
- type ByteSliceAppender
- type CommonError
- type CommonTime
- type Duration
- type F32
- type F64
- type Int
- type Int16
- type Int32
- type Int64
- type Int8
- type Interface
- type Stringer
- type Uint
- type Uint16
- type Uint32
- type Uint64
- type Uint8
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteSlice ¶
type ByteSlice struct {
// contains filtered or unexported fields
}
func NewByteSlice ¶
func (*ByteSlice) AppendByte ¶
func (*ByteSlice) AppendBytes ¶
func (*ByteSlice) AppendFloat32 ¶
func (*ByteSlice) AppendFloat64 ¶
func (*ByteSlice) AppendGenerics ¶
func (b *ByteSlice) AppendGenerics(appenders ...ByteSliceAppender) *ByteSlice
AppendGenerics calls AppendTo of appenders one by one to b's data. To generate AppendTo functions quickly and automatically, use "gen-bsa".
func (*ByteSlice) AppendInt16 ¶
func (*ByteSlice) AppendInt32 ¶
func (*ByteSlice) AppendInt64 ¶
func (*ByteSlice) AppendInt8 ¶
func (*ByteSlice) AppendPointer ¶
AppendPointer appends the hexadecimal address of p with a "0x" prefix. To append a pointer of struct or other complex data structure, implement ByteSliceAppender or Stringer and use AppendGenerics.
func (*ByteSlice) AppendRune ¶
func (*ByteSlice) AppendString ¶
func (ByteSlice) AppendTo ¶
AppendTo appends b's data to b1's data (b1 = b1 + b). It implements BSA.
func (*ByteSlice) AppendUint ¶
func (*ByteSlice) AppendUint16 ¶
func (*ByteSlice) AppendUint32 ¶
func (*ByteSlice) AppendUint64 ¶
func (*ByteSlice) AppendUint8 ¶
func (ByteSlice) Bytes ¶
Bytes returns b.data. It is NOT a copy, so the result will be changed after b modified.
func (ByteSlice) ReadCloser ¶
func (b ByteSlice) ReadCloser() io.ReadCloser
ReadCloser creates an io.ReadCloser, but Close does nothing.
type ByteSliceAppender ¶
type ByteSliceAppender interface {
AppendTo(*ByteSlice)
}
type CommonError ¶
type CommonError struct {
// contains filtered or unexported fields
}
func Error ¶
func Error(e error) CommonError
func (CommonError) AppendTo ¶
func (e CommonError) AppendTo(b *ByteSlice)
func (CommonError) String ¶
func (e CommonError) String() string
type CommonTime ¶
type CommonTime struct {
// contains filtered or unexported fields
}
func Time ¶
func Time(t time.Time) CommonTime
func (CommonTime) AppendTo ¶
func (t CommonTime) AppendTo(b *ByteSlice)
func (CommonTime) String ¶
func (t CommonTime) String() string
type Interface ¶
type Interface interface { ByteSliceAppender Stringer }
Click to show internal directories.
Click to hide internal directories.