Skip to content

fuweid/gid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gid for fun

gid is used to get current goroutine id from os-thread.

get started

This package has only one exported function, GoID. Easy to remember, right? 😀

func doXXX() {
        id := gid.GoID() // get current goroutine id
	      ....
}

Support?

  • go 1.7.x @ amd64 linux
  • go 1.8.x @ amd64 linux
  • go 1.9.x @ amd64 linux

Plan to support osx... but travis osx bootup is too slow for testing 😂. I will add it when testing env is ready.

About

get current goroutine id from os-thread

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages