goid

package module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 0 Imported by: 2

README

Getting Started

An out of box example. playground

package main

import (
	"github.com/phuslu/goid"
)

func main() {
	println(goid.Goid())
}

// Output:
//   1

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Goid

func Goid() int64

Goid returns the current goroutine id. It exactly matches goroutine id of the stack trace.

Example
fmt.Println(Goid())
Output:

1

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL