From 00def81c2a57723c868a40670d7fba1227e4ae86 Mon Sep 17 00:00:00 2001 From: Fusl Date: Fri, 11 Mar 2022 16:14:53 +0000 Subject: [PATCH] need to make a []byte of length len(b), not capacity len(b) --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index adbe35f..e04771b 100644 --- a/main.go +++ b/main.go @@ -425,7 +425,7 @@ func (that *GlobalBackfeedManager) Handle(res http.ResponseWriter, req *http.Req if len(b) == 0 { continue } - bcopy := make([]byte, 0, len(b)) + bcopy := make([]byte, len(b)) copy(bcopy, b) item := &BackfeedItem{ PrimaryShard: GenShardHash(bcopy),