Search Apps Documentation Source Content File Folder Download Copy Actions Download

nilhole.gno

0.27 Kb · 15 lines
 1package nilhole
 2
 3type Slot struct{ Field string }
 4
 5type Mutator interface{ Run(s *Slot) }
 6
 7type Dispatcher struct{}
 8
 9func (d *Dispatcher) UseMutator(s *Slot, m Mutator) { m.Run(s) }
10
11var PDispatch = &Dispatcher{}
12
13type EvilInt int
14
15func (EvilInt) Run(s *Slot) { s.Field = "pwnd" }