Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Coder ¶
type Coder struct {
// contains filtered or unexported fields
}
Example ¶
type Foo struct {
Name string
ID int
mjau string
}
c := NewCoder()
b := binary.NewBufferWriter(1024)
err := c.Encode(b, &Foo{
Name: "mjau",
})
if err != nil {
panic(err)
}
fmt.Println(b.Bytes())
Output: [4 109 106 97 117 0 0 0 0 0 0 0 0]
func NewCoder ¶
func NewCoder(opt ...CoderOptions) *Coder
type CoderOptions ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.