#660·goconvey

渲染会在 proto 消息上引起无数次内存分配

作者: antoniomacri创建于 2022年5月18日更新于 2024年5月21日

考虑一下这个代码片段:

import (
	"GitHub.com/smartystreets/goconvey/convey"
	"google.golang.org/protobuf/types/known/wrapperspb"
	"log"
	"testing"
)

func TestConveyBug(t *testing.T) {
	Convey("Given something", t, func() {
		var x = &wrapperspb.BoolValue{Value: false}
		log.Printf("Receive type %v", x)
		So(nil, ShouldResemble, x)
	})
}

内容来源: smartystreets/goconvey