I was in the middle of implementing a JSON-based vg/recorder.Canvas (b/c of go-hep/hep#982), looking at the code in vg/recorder.
when I noticed:
func (c *Canvas) append(a Action) {
if c.c != nil {
a.ApplyTo(c)
}
c.Actions = append(c.Actions, a)
}
I think a.ApplyTo(c) should read a.ApplyTo(c.c).
right ?
but Canvas.c is never accessed (outside of Canvas.append, that is), and cannot be modified outside of vg/recorder.
so, couldn't we just get rid of this field ?