Documentation ¶
Index ¶
- Constants
- func Crash(reason string, w io.WriteCloser)deprecated
- type CrashReport
- func (c *CrashReport) Include(p Profiles) *CrashReport
- func (c *CrashReport) IncludeCustom(name string) *CrashReport
- func (c *CrashReport) IncludeFile(path string) *CrashReport
- func (c *CrashReport) NoStack() *CrashReport
- func (c *CrashReport) NoSysInfo() *CrashReport
- func (c *CrashReport) Reason(s ...string) *CrashReport
- func (c *CrashReport) Write(w io.Writer) (err error)
- func (c *CrashReport) WriteTo(filename string) error
- type Profiles
Constants ¶
View Source
const ( ProfileHeap Profiles = internal.ProfileHeap ProfileBlock = internal.ProfileBlock ProfileMutex = internal.ProfileMutex ProfileAllocs = internal.ProfileAllocs ProfileGoroutines = internal.ProfileGoroutines ProfileThreadCreate = internal.ProfileThreadCreate ProfileAll = ProfileHeap | ProfileBlock | ProfileMutex | ProfileAllocs | ProfileGoroutines | ProfileThreadCreate )
Profiles
Variables ¶
This section is empty.
Functions ¶
func Crash
deprecated
func Crash(reason string, w io.WriteCloser)
Crash write the the stacktrace and profiles to to w
Deprecated: This panics if any errors occur. Use NewCrashReport instead.
Types ¶
type CrashReport ¶
type CrashReport struct {
// contains filtered or unexported fields
}
CrashReport a crash report. The Write/WriteTo methods may be used multiple times.
func NewCrashReport ¶
func NewCrashReport(reason ...string) *CrashReport
NewCrashReport creates a new crash report
func (*CrashReport) Include ¶
func (c *CrashReport) Include(p Profiles) *CrashReport
Include includes the given profiles in the crash report
func (*CrashReport) IncludeCustom ¶
func (c *CrashReport) IncludeCustom(name string) *CrashReport
IncludeCustom includes a custom profile
func (*CrashReport) IncludeFile ¶
func (c *CrashReport) IncludeFile(path string) *CrashReport
IncludeFile includes the given file in the crash report. Any errors when including these files are silently ignored.
func (*CrashReport) NoStack ¶
func (c *CrashReport) NoStack() *CrashReport
NoStack excludes the stack from the crash report
func (*CrashReport) NoSysInfo ¶
func (c *CrashReport) NoSysInfo() *CrashReport
NoSysInfo excludes system info from the crash report
func (*CrashReport) Reason ¶
func (c *CrashReport) Reason(s ...string) *CrashReport
Reason appends the given strings to the reason
func (*CrashReport) WriteTo ¶
func (c *CrashReport) WriteTo(filename string) error
WriteTo writes the crash report to the given file
Click to show internal directories.
Click to hide internal directories.