Skip to content
t-yukiPublic

About

Get current goroutine id for debugging. See also: https://github.com/huandu/goroutine

Resources

Stars

13 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goid

Package goid provides a function that gets goroutine id of current goroutine. Run go generate before use.

// GoID returns the current goroutine id.
// It exactly matches goroutine id of the stack trace.
// Note that users SHOULD NOT use this id to implement functional features such as goroutine local storage.
// It is intended to support debug logger or testing.
func GoID() int64

About

Get current goroutine id for debugging. See also: https://github.com/huandu/goroutine

Resources

Stars

13 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages