使用两个包
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
github:https://github.com/onsi/ginkgo
文章:
http://onsi.github.io/ginkgo/#measuring-time
使用duck typing方式多
创建接口,放入不同的构造中,然后另建结构实现,返回自己想要的值,可以解决某些方法前置调用
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
github:https://github.com/onsi/ginkgo
文章:
http://onsi.github.io/ginkgo/#measuring-time
使用duck typing方式多
创建接口,放入不同的构造中,然后另建结构实现,返回自己想要的值,可以解决某些方法前置调用