mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
op: complete the MacroOp example
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -48,10 +48,15 @@ The MacroOp records a list of operations to be executed later:
|
||||
|
||||
ops := new(op.Ops)
|
||||
var macro op.MacroOp
|
||||
macro.Record()
|
||||
macro.Record(ops)
|
||||
// Record operations by adding them.
|
||||
op.InvalidateOp{}.Add(ops)
|
||||
...
|
||||
// End recording.
|
||||
macro.Stop()
|
||||
|
||||
// replay the recorded operations by calling Add:
|
||||
macro.Add(ops)
|
||||
|
||||
*/
|
||||
package op
|
||||
|
||||
Reference in New Issue
Block a user