The visitor design pattern explains how to separate operations of an object from the object and then it gives a simple example using Go.