func ExampleMultipleAmf0_Marshals() { s := protocol.Amf0String("oryx") n := protocol.Amf0Number(1.0) b := protocol.Amf0Boolean(true) if b, err := core.Marshals(&s, &n, &b); err != nil { _ = err // error. } else { _ = b // use marshaled []byte } }
func ExampleAmf0Boolean_MarshalBinary() { s := protocol.Amf0Boolean(true) var b []byte var err error if b, err = s.MarshalBinary(); err != nil { return } fmt.Println(len(b)) fmt.Println(b) // Output: // 2 // [1 1] }