mirror of
https://github.com/luxfi/utils.git
synced 2026-07-29 00:45:09 +00:00
13 lines
271 B
Go
13 lines
271 B
Go
// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package utils
|
|
|
|
import "runtime"
|
|
|
|
func GetStacktrace(all bool) string {
|
|
buf := make([]byte, 1<<16)
|
|
n := runtime.Stack(buf, all)
|
|
return string(buf[:n])
|
|
}
|