Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/mao888/golang-guide
/ main
Function
main
golang/go-study/go语言基础/并发/并发安全和锁/WaitGroup/waitgroup.go:19–24 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
17
fmt.Println(
"Hello Goroutine!"
)
18
}
19
func
main() {
20
wg.Add(1)
21
go
hello()
// 启动另外一个goroutine去执行hello函数
22
fmt.Println(
"main goroutine done!"
)
23
wg.Wait()
24
}
Callers
nothing calls this directly
Calls
3
hello
Function · 0.70
Add
Method · 0.45
Wait
Method · 0.45
Tested by
no test coverage detected