mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 18:05:35 +00:00
op: change signature of Ops.Write
By returning the allocated data buffer, Ops can become an interface in a future change without forcing operations to allocate. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -24,9 +24,8 @@ type Event struct {
|
||||
}
|
||||
|
||||
func (p Op) Add(o *op.Ops) {
|
||||
data := make([]byte, opconst.TypeProfileLen)
|
||||
data := o.Write(opconst.TypeProfileLen, p.Key)
|
||||
data[0] = byte(opconst.TypeProfile)
|
||||
o.Write(data, p.Key)
|
||||
}
|
||||
|
||||
func (p Event) ImplementsEvent() {}
|
||||
|
||||
Reference in New Issue
Block a user