package cypress

import "sync"

var pbBufPool sync.Pool

func init() {
	pbBufPool.New = func() interface{} {
		return make([]byte, 128)
	}
}

package cypress

import "sync"

var pbBufPool sync.Pool

func init() {
	pbBufPool.New = newBuf
}

func newBuf() interface{} {
	return make([]byte, 128)
}

--- 
+++ 
@@ -5,9 +5,7 @@
 var pbBufPool sync.Pool
 
 func init() {
-	pbBufPool.New = newBuf
+	pbBufPool.New = func() interface{} {
+		return make([]byte, 128)
+	}
 }
-
-func newBuf() interface{} {
-	return make([]byte, 128)
-}
Use a closure rather than a standalone func
