go design pattern