MCPcopy Create free account
hub / github.com/maruel/panicparse / getFiles

Function getFiles

stack/context.go:942–958  ·  view source on GitHub ↗

getFiles returns all the source files deduped and ordered.

(goroutines []*Goroutine)

Source from the content-addressed store, hash-verified

940
941// getFiles returns all the source files deduped and ordered.
942func getFiles(goroutines []*Goroutine) []string {
943 files := map[string]struct{}{}
944 for _, g := range goroutines {
945 for _, c := range g.Stack.Calls {
946 files[c.RemoteSrcPath] = struct{}{}
947 }
948 }
949 if len(files) == 0 {
950 return nil
951 }
952 out := make([]string, 0, len(files))
953 for f := range files {
954 out = append(out, f)
955 }
956 sort.Strings(out)
957 return out
958}
959
960// splitPath splits a path using "/" as separator into its components.
961//

Callers 1

findRootsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…