Package goroutine provides utilities for inspecting goroutines at runtime, including obtaining IDs and stack traces.
func ID() uint64
ID returns the goroutine ID of the caller.
func Stack(goid uint64) string
Stack returns the stack trace for the goroutine with the given ID. Returns an empty string if the goroutine is not found.
Package goroutine provides utilities for inspecting goroutines at runtime, including obtaining IDs and stack traces.