Documentation
¶
Overview ¶
Example ¶
package main
import (
"fmt"
"time"
"unsafe"
)
func main() {
// Example value
now := time.Now()
fmt.Println(getString(unsafe.Pointer(&now)))
}
func getString(ptr unsafe.Pointer) string {
// Interpret ptr as a pointer to a fmt.Stringer interface.
// This is only safe if ptr indeed points to a valid fmt.Stringer variable.
s := *(*fmt.Stringer)(ptr)
return s.String()
}
Output: TODO
Index ¶
- func AppendBool(b []byte, v bool) []byte
- func AppendByte(b []byte, val byte) []byte
- func AppendBytes(b []byte, bytes []byte) []byte
- func AppendFloat32(b []byte, val float32) []byte
- func AppendFloat32Lossy(b []byte, val float32) []byte
- func AppendFloat64(b []byte, val float64) []byte
- func AppendFloat64Lossy(b []byte, val float64) []byte
- func AppendInt(b []byte, val int) []byte
- func AppendInt16(b []byte, nval int16) []byte
- func AppendInt32(b []byte, nval int32) []byte
- func AppendInt64(b []byte, nval int64) []byte
- func AppendInt8(b []byte, nval int8) []byte
- func AppendRune(b []byte, r rune) []byte
- func AppendString(b []byte, s string) []byte
- func AppendStringer(b []byte, v fmt.Stringer) []byte
- func AppendTextAppender(b []byte, v fast.TextAppender) []byte
- func AppendUint(b []byte, val uint) []byte
- func AppendUint16(b []byte, val uint16) []byte
- func AppendUint32(b []byte, val uint32) []byte
- func AppendUint64(b []byte, val uint64) []byte
- func AppendUint8(b []byte, val uint8) []byte
- func AppendUnsafeBool(b []byte, v unsafe.Pointer) []byte
- func AppendUnsafeByte(b []byte, v unsafe.Pointer) []byte
- func AppendUnsafeBytes(b []byte, v unsafe.Pointer) []byte
- func AppendUnsafeFloat32(b []byte, v unsafe.Pointer) []byte
- func AppendUnsafeFloat32Lossy(b []byte, v unsafe.Pointer) []byte
- func AppendUnsafeFloat64(b []byte, v unsafe.Pointer) []byte
- func AppendUnsafeFloat64Lossy(b []byte, v unsafe.Pointer) []byte
- func AppendUnsafeInt(b []byte, v unsafe.Pointer) []byte
- func AppendUnsafeInt16(b []byte, v unsafe.Pointer) []byte
- func AppendUnsafeInt32(b []byte, v unsafe.Pointer) []byte
- func AppendUnsafeInt64(b []byte, v unsafe.Pointer) []byte
- func AppendUnsafeInt8(b []byte, v unsafe.Pointer) []byte
- func AppendUnsafeRune(b []byte, v unsafe.Pointer) []byte
- func AppendUnsafeString(b []byte, v unsafe.Pointer) []byte
- func AppendUnsafeStringer(b []byte, v unsafe.Pointer) []byte
- func AppendUnsafeTextAppender(b []byte, v unsafe.Pointer) []byte
- func AppendUnsafeUint(b []byte, v unsafe.Pointer) []byte
- func AppendUnsafeUint16(b []byte, v unsafe.Pointer) []byte
- func AppendUnsafeUint32(b []byte, v unsafe.Pointer) []byte
- func AppendUnsafeUint64(b []byte, v unsafe.Pointer) []byte
- func AppendUnsafeUint8(b []byte, v unsafe.Pointer) []byte
- type Appender
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendBool ¶
func AppendByte ¶
func AppendBytes ¶
func AppendFloat32 ¶
func AppendFloat32Lossy ¶
func AppendFloat64 ¶
func AppendFloat64Lossy ¶
func AppendInt16 ¶
func AppendInt32 ¶
func AppendInt64 ¶
func AppendInt8 ¶
func AppendRune ¶
func AppendString ¶
func AppendTextAppender ¶
func AppendTextAppender(b []byte, v fast.TextAppender) []byte
func AppendUint ¶
func AppendUint16 ¶
func AppendUint32 ¶
func AppendUint64 ¶
func AppendUint8 ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.