Source File
trace.go
Belonging Package
github.com/go-faster/errors
//go:build !noerrtrace// +build !noerrtracepackage errorsimport ()var traceFlag int64const (traceEnabled = 0 // enabled by defaulttraceDisabled = 1)// setTrace sets tracing flag that controls capturing caller frames.func ( bool) {if {atomic.StoreInt64(&traceFlag, traceEnabled)} else {atomic.StoreInt64(&traceFlag, traceDisabled)}}// enableTrace enables capturing caller frames.//// Intentionally left unexported.func () { setTrace(true) }// DisableTrace disables capturing caller frames.func () { setTrace(false) }// Trace reports whether caller stack capture is enabled.func () bool {return atomic.LoadInt64(&traceFlag) == traceEnabled}
![]() |
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |