internal

package
v1.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package internal implements panicparse

It is mostly useful on servers will large number of identical goroutines, making the crash dump harder to read than strictly necessary.

Colors:

  • Magenta: first goroutine to be listed.
  • Yellow: main package.
  • Green: standard library.
  • Red: other packages.

Bright colors are used for exported symbols.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main() error

Main is implemented here so both 'pp' and 'panicparse' executables can be compiled. This is to work around the Perl Package manager 'pp' that is preinstalled on some OSes.

Types

type Palette added in v1.2.0

type Palette struct {
	EOLReset string

	// Routine header.
	RoutineFirst string // The first routine printed.
	Routine      string // Following routines.
	CreatedBy    string
	Race         string

	// Call line.
	Package                     string
	SrcFile                     string
	FuncMain                    string
	FuncLocationUnknown         string
	FuncLocationUnknownExported string
	FuncGoMod                   string
	FuncGoModExported           string
	FuncGOPATH                  string
	FuncGOPATHExported          string
	FuncGoPkg                   string
	FuncGoPkgExported           string
	FuncStdLib                  string
	FuncStdLibExported          string
	Arguments                   string
}

Palette defines the color used.

An empty object Palette{} can be used to disable coloring.

func (*Palette) BucketHeader added in v1.2.0

func (p *Palette) BucketHeader(b *stack.Bucket, pf pathFormat, multipleBuckets bool) string

BucketHeader prints the header of a goroutine signature.

func (*Palette) GoroutineHeader added in v1.6.0

func (p *Palette) GoroutineHeader(g *stack.Goroutine, pf pathFormat, multipleGoroutines bool) string

GoroutineHeader prints the header of a goroutine.

func (*Palette) StackLines added in v1.2.0

func (p *Palette) StackLines(signature *stack.Signature, srcLen, pkgLen int, pf pathFormat) string

StackLines prints one complete stack trace, without the header.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL