数字与时间相乘
已收录文章:1篇
-
背景说明: 10 * time.Second //正常数字相乘没错 但是 package main import "time" func main(){ connectTimeout := 10 time.Sleep(time.Second*connectTimeout) } 这样使用会报错 int and time.Duration are different types. You need to c435 收藏