Skip to content

t-yuki/goid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published