getFiles returns all the source files deduped and ordered.
(goroutines []*Goroutine)
| 940 | |
| 941 | // getFiles returns all the source files deduped and ordered. |
| 942 | func 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 | // |
no outgoing calls
no test coverage detected
searching dependent graphs…