mirror of
https://github.com/luxfi/err.git
synced 2026-10-30 16:58:19 +00:00
github.com/luxfi/err existed only as loose files: no .git, no history, no remote. Sweeps that look for a .git directory could not see it, and an rm -rf would have destroyed it with nothing to recover from. Committed as-is; no source modified. NOTE: no remote. This is still one copy in one place.
13 lines
269 B
Go
13 lines
269 B
Go
// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package err
|
|
|
|
import "runtime"
|
|
|
|
func GetStacktrace(all bool) string {
|
|
buf := make([]byte, 1<<16)
|
|
n := runtime.Stack(buf, all)
|
|
return string(buf[:n])
|
|
}
|