package
0.0.0-20241111155842-e960732cbb21
Repository: https://github.com/weidows/wutils.git
Documentation: pkg.go.dev
# Functions
No description provided by the author
WithTimeOut 超时退出返回 nil, 注意 func 返回值不能是 any
From: https://geektutu.com/post/hpg-timeout-goroutine.html
WithTimeOut(800*time.Millisecond, func () int { time.Sleep(time.Millisecond) return 1 }) // 1
WithTimeOut(800*time.Millisecond, func () string { time.Sleep(time.Second) return "2" }) // nil.