Design Patterns in Go: Memento or how to undo actions.

Introduction The memento pattern can be used to (partially) expose the internal state of an object. One use case for this pattern is to serialize an object to a file or as JSON for example, another is to build an…














