Pattern Generator in Go