Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Frame ¶
type Frame uintptr
Frame represents a program counter inside a stack frame. For historical reasons: if Frame is interpreted as a uintptr its value represents the program counter + 1.
func (Frame) Format ¶
Format formats the frame according to the fmt.Formatter interface.
%s source file %d source line %n function name %v equivalent to %s:%d
Format accepts flags that alter the printing of some verbs, as follows:
%+s function name and path of source file relative to the compile time
GOPATH separated by \n\t (<funcname>\n\t<path>)
%+v equivalent to %+s:%d
func (Frame) MarshalText ¶
MarshalText formats a stacktrace Frame as a text string. The output is the same as that of fmt.Sprintf("%+v", f), but without newlines or tabs.
type Stack ¶
type Stack []uintptr
stack represents a stack of program counters.
func Callers ¶
Callers Возвращает массив указателей из стека вызовов (переходов) PC - program counter
func (*Stack) StackTrace ¶
type Trace ¶
type Trace []Frame
Trace stack (массив) Frames от самых "поздних" к самым "ранним".
func (Trace) Format ¶
Format реализация интерфейса fmt.Formatter.
%s список файлов для каждого фрейма в стеке %v список файлов с номерами строк, из которых был произведен вызов для каждого фрейма в стеке
Format принимает дополнительные флаги для некоторых "глаголов":
%+v печатает название файла, название функции и строку вызова для каждого фрейма в стеке