Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/maruel/panicparse
/ functions
Functions
745 in github.com/maruel/panicparse
⨍
Functions
745
◇
Types & classes
31
↓ 73 callers
Function
newCall
(f string, a Args, s string, l int)
stack/stack_test.go:381
↓ 60 callers
Function
pathJoin
(s ...string)
stack/stack.go:862
↓ 34 callers
Method
String
String prints the argument as the name if present, otherwise as the value.
stack/stack.go:149
↓ 33 callers
Function
newCallLocal
(f string, a Args, s string, l int)
stack/stack_test.go:387
↓ 29 callers
Function
compareString
(t *testing.T, want, got string)
stack/stack_test.go:412
↓ 26 callers
Function
ScanSnapshot
ScanSnapshot scans the Reader for the output from runtime.Stack() in br. Returns nil *Snapshot if no stack trace was detected. If a Snapshot is retu
stack/context.go:160
↓ 16 callers
Function
defaultOpts
()
stack/context_test.go:2483
↓ 16 callers
Function
newFunc
(s string)
stack/stack_test.go:371
↓ 15 callers
Function
compareString
(t *testing.T, want, got string)
internal/main_test.go:132
↓ 13 callers
Method
Write
(b []byte)
cmd/panicweb/main.go:161
↓ 13 callers
Method
funcColor
(l stack.Location, main, exported bool)
internal/ui.go:118
↓ 11 callers
Method
Aggregate
Aggregate merges similar goroutines into buckets. The buckets are ordered in library provided order of relevancy. You can reorder at your choosing.
stack/bucket.go:42
↓ 10 callers
Function
DefaultOpts
DefaultOpts returns default options to process the snapshot.
stack/context.go:64
↓ 10 callers
Method
less
less compares two Stack, where the ones that are less are more important, so they come up front. A Stack with more private functions is 'less' so it
stack/stack.go:564
↓ 8 callers
Method
BucketHeader
BucketHeader prints the header of a goroutine signature.
internal/ui.go:162
↓ 8 callers
Function
SnapshotHandler
SnapshotHandler implements http.HandlerFunc to returns a panicparse HTML format for a snapshot of the current goroutines. For best results, compile t
stack/webstack/webstack.go:46
↓ 8 callers
Method
ToHTML
(io.Writer, template.HTML)
internal/main.go:107
↓ 8 callers
Method
equal
equal returns true only if both arguments are exactly equal.
stack/stack.go:179
↓ 8 callers
Function
getSignature
()
stack/stack_test.go:533
↓ 8 callers
Method
guessPaths
()
stack/context.go:219
↓ 8 callers
Function
name
(n ast.Node)
stack/source.go:159
↓ 8 callers
Function
pstCount
(s []panicwebSignatureType, t panicwebSignatureType)
stack/context_test.go:2262
↓ 8 callers
Method
similar
similar returns true if the two Arg are equal or almost but not quite equal.
stack/stack.go:184
↓ 8 callers
Function
similarGoroutines
similarGoroutines compares slice of Goroutine to be similar enough. Warning: it mutates inputs.
stack/stack_test.go:422
↓ 7 callers
Function
PanicOutputs
PanicOutputs returns a map of the output of every subcommands. panic is built with inlining disabled. The subcommand "race" is built with the race d
internal/internaltest/internaltest.go:47
↓ 7 callers
Function
atou
atou is a fast Atoi() function. It is a very simplified version of strconv.Atoi() that it never go into the slow path and it operates on []byte inste
stack/context.go:1162
↓ 7 callers
Function
compareErr
(t *testing.T, want, got error)
stack/stack_test.go:399
↓ 7 callers
Function
escape
(s string)
stack/html.go:124
↓ 7 callers
Function
newCallLocal
(f string, a stack.Args, s string, l int)
internal/ui_test.go:183
↓ 7 callers
Method
updateLocations
updateLocations initializes LocalSrcPath, RelSrcPath, Location and ImportPath. goroot, localgoroot, localgomod, gomodImportPath and gopaths are expec
stack/stack.go:409
↓ 6 callers
Method
SleepString
SleepString returns a string "N-M minutes" if the goroutine(s) slept for a long time. Returns an empty string otherwise.
stack/stack.go:762
↓ 6 callers
Method
formatCall
(c *stack.Call)
internal/ui.go:52
↓ 5 callers
Function
GetGoMinorVersion
GetGoMinorVersion returns the Go1 minor version. Returns 0 for a developer build, panics if can't parse the version. Ignores the revision (go1.<mino
internal/internaltest/internaltest.go:137
↓ 5 callers
Method
Init
Init parses the raw function call line from a goroutine stack trace. Go stack traces print a mangled function call, this wrapper unmangle the string
stack/stack.go:52
↓ 5 callers
Function
getGOPATHs
getGOPATHs returns parsed GOPATH or its default, using "/" as path separator.
stack/context.go:1117
↓ 5 callers
Function
parseFunc
parseFunc only return an error if it also returns true. Uses reFunc.
stack/context.go:819
↓ 4 callers
Function
IsUsingModules
IsUsingModules returns if go modules are enabled. It reads the current value of GO111MODULES.
internal/internaltest/internaltest.go:118
↓ 4 callers
Method
StackLines
StackLines prints one complete stack trace, without the header.
internal/ui.go:218
↓ 4 callers
Function
StaticPanicwebOutput
StaticPanicwebOutput returns a constant version of panicweb output for use in benchmarks.
internal/internaltest/internaltest.go:106
↓ 4 callers
Function
compareBuckets
(t *testing.T, want, got []*Bucket)
stack/bucket_test.go:387
↓ 4 callers
Function
compareInt
(t *testing.T, want, got int)
internal/ui_test.go:208
↓ 4 callers
Function
lineToByteOffsets
lineToByteOffsets extract the line number into raw file offset. Inserts a dummy 0 at offset 0 so line offsets can be 1 based.
stack/source.go:95
↓ 4 callers
Function
panicint
Utility functions.
cmd/panic/main.go:92
↓ 4 callers
Function
parseFile
parseFile only return an error if also processing a Call. Uses reFile.
stack/context.go:900
↓ 4 callers
Function
splitPath
splitPath splits a path using "/" as separator into its components. The first item has its initial path separator kept.
stack/context.go:963
↓ 4 callers
Function
trimLeftSpace
trimLeftSpace is the faster equivalent of bytes.TrimLeft(s, "\t ").
stack/context.go:1177
↓ 3 callers
Method
IsRace
IsRace returns true if a race detector stack trace was found. Otherwise, it is a normal goroutines snapshot. When a race condition was detected, it
stack/context.go:215
↓ 3 callers
Function
Main
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 prein
internal/main.go:192
↓ 3 callers
Method
augment
augment processes source files to improve calls to be more descriptive. It modifies goroutines in place. It requires calling guessPaths() to work pro
stack/context.go:235
↓ 3 callers
Function
build
build builds to a temporary file and returns the path to it.
internal/internaltest/internaltest.go:164
↓ 3 callers
Function
calcBucketsLengths
calcBucketsLengths returns the maximum length of the source lines and package names.
internal/ui.go:78
↓ 3 callers
Function
compareGoroutines
(t *testing.T, want, got []*Goroutine)
stack/stack_test.go:519
↓ 3 callers
Function
execRun
execRun runs a command and returns the combined output. It ignores the exit code, since it's meant to run panic, which crashes by design.
internal/internaltest/internaltest.go:223
↓ 3 callers
Function
getBuckets
getBuckets returns a slice for testing.
stack/html_test.go:298
↓ 3 callers
Function
getPanicParseDir
getPanicParseDir returns the path to the root directory of panicparse package, using "/" as path separator.
stack/context_test.go:2492
↓ 3 callers
Function
getSrcBranchURL
getSrcBranchURL returns a link to the source on the web and the tag name for the package version, if possible.
stack/html.go:134
↓ 3 callers
Method
init
Init initializes RemoteSrcPath, SrcName, DirName and Line. For test main, it initializes Location only with Stdlib. It does its best educated guess
stack/stack.go:383
↓ 3 callers
Method
isGoModule
isGoModule returns the string to the directory containing a go.mod file, and the go import path it represents, if found.
stack/context.go:1011
↓ 3 callers
Function
isRootedIn
isRootedIn returns a root if the file split in parts exists under root. Uses "/" as path separator.
stack/context.go:994
↓ 3 callers
Method
merge
merge merges two similar Args, zapping out differences.
stack/stack.go:277
↓ 3 callers
Function
process
process copies stdin to stdout and processes any "panic: " line found. If html is used, a stack trace is written to this file instead.
internal/main.go:149
↓ 3 callers
Function
unsafeString
unsafeString performs an unsafe conversion from a []byte to a string. The returned string will share the underlying memory with the []byte which thus
stack/context.go:1211
↓ 3 callers
Method
walk
walk traverses all non-aggregate arguments in the Args struct, calling the provided visitor function with each Arg.
stack/stack.go:300
↓ 2 callers
Function
Callback
Callback calls back a function through an external then internal function.
cmd/panic/internal/internal.go:9
↓ 2 callers
Function
Compile
Compile compiles sources into an executable.
internal/internaltest/internaltest.go:191
↓ 2 callers
Function
GetAsync
GetAsync does an HTTP GET to the URL but leaves the actual fetching to a goroutine.
cmd/panicweb/internal/internal.go:20
↓ 2 callers
Method
Len
()
stack/stack.go:868
↓ 2 callers
Method
String
()
stack/stack.go:233
↓ 2 callers
Function
compareStacks
(t *testing.T, want, got *Stack)
stack/stack_test.go:526
↓ 2 callers
Function
createTree
(t *testing.T, root string, tree map[string]string)
stack/context_test.go:2505
↓ 2 callers
Method
createdByString
(s *stack.Signature)
internal/ui.go:69
↓ 2 callers
Function
getCrash
(t *testing.T, main string, disableInline bool)
stack/source_test.go:1619
↓ 2 callers
Function
isFile
isFile returns true if the path is a valid file.
stack/context.go:984
↓ 2 callers
Method
routineColor
routineColor returns the color for the header of the goroutines bucket.
internal/ui.go:154
↓ 2 callers
Function
splitTag
(s string)
stack/html.go:214
↓ 2 callers
Function
symbol
symbol is the hashtag to use to refer to the symbol when looking at documentation. All of godoc/gddo, pkg.go.dev and golang.org/godoc use the same sy
stack/html.go:238
↓ 2 callers
Function
testAugmentCommon
(t *testing.T, content []byte, mayBeInlined bool, want Stack)
stack/source_test.go:1422
↓ 2 callers
Function
toHTML
Private stuff.
stack/html.go:46
↓ 2 callers
Function
toHTML
(h toHTMLer, p string, needsEnv bool)
internal/main.go:110
↓ 2 callers
Function
trimCurlyBrackets
trimCurlyBrackets is the faster equivalent of bytes.TrimRight(bytes.TrimLeft(s, "{"), "}"). The function also returns the number of curly brackets tri
stack/context.go:1190
↓ 2 callers
Function
usage
()
cmd/panic/main.go:441
↓ 2 callers
Function
zapCalls
(t *testing.T, want, got *Call)
stack/stack_test.go:483
↓ 2 callers
Function
zapSignatures
(t *testing.T, want, got *Signature)
stack/stack_test.go:453
↓ 2 callers
Function
zapStacks
(t *testing.T, want, got *Stack)
stack/stack_test.go:469
↓ 1 callers
Method
GoroutineHeader
GoroutineHeader prints the header of a goroutine.
internal/ui.go:181
↓ 1 callers
Function
PanicwebOutput
PanicwebOutput returns the output of panicweb with inlining disabled. The function panics if any internal error occurs.
internal/internaltest/internaltest.go:21
↓ 1 callers
Method
Pànic
Pànic panics.
cmd/panic/internal/utf8/utf8.go:16
↓ 1 callers
Function
StaticPanicRaceOutput
StaticPanicRaceOutput returns a constant version of 'panic race' output.
internal/internaltest/internaltest.go:111
↓ 1 callers
Function
augmentCall
augmentCall walks the function and populate call accordingly.
stack/source.go:242
↓ 1 callers
Method
augmentGoroutine
augmentGoroutine processes source files to improve call to be more descriptive. It modifies the routine.
stack/source.go:34
↓ 1 callers
Method
buffered
()
stack/reader.go:53
↓ 1 callers
Function
calcGoroutinesLengths
calcGoroutinesLengths returns the maximum length of the source lines and package names.
internal/ui.go:96
↓ 1 callers
Method
callLine
callLine prints one stack line.
internal/ui.go:207
↓ 1 callers
Function
callback
(f func())
cmd/panic/internal/internal.go:13
↓ 1 callers
Function
dummy
(ctx context.Context, a1, a2, a3, a4, a5, a6, a7, a8, a9 *int)
stack/webstack/webstack_test.go:131
↓ 1 callers
Method
equal
equal returns true only if both signatures are exactly equal.
stack/stack.go:693
↓ 1 callers
Function
extractArgumentsType
extractArgumentsType returns the name of the type of each input argument.
stack/source.go:212
↓ 1 callers
Function
fieldToType
fieldToType returns the type name and whether if it's an ellipsis.
stack/source.go:179
↓ 1 callers
Method
fill
fill reads a new chunk into the buffer.
stack/reader.go:25
↓ 1 callers
Method
findRoots
findRoots sets member RemoteGOROOT, RemoteGOPATHs and LocalGomods. This causes disk I/O as it checks for file presence. Returns the number of missin
stack/context.go:1040
next →
1–100 of 745, ranked by callers