使用go get进行安装:go get github.com/smartystreets/goconvey
单元测试代码
package goconvery
import("errors")funcAdd(a, b int)int{
return a + b
}funcSub(a, b int)int{
return a - b
}funcMultiply(a, b int)int{
return a * b
}funcDivision(a, b int)(int,error){
if b ==0{
return
goconvey安装使用go get进行安装:go get github.com/smartystreets/goconvey单元测试代码package goconveryimport ( "errors")func Add(a, b int) int { return a + b}func Sub(a, b int) int { return a - b}f...