Snapshot is a parsed runtime.Stack() or race detector dump.
| 92 | |
| 93 | // Snapshot is a parsed runtime.Stack() or race detector dump. |
| 94 | type Snapshot struct { |
| 95 | // Goroutines is the Goroutines found. |
| 96 | // |
| 97 | // They are in the order that they were printed. |
| 98 | Goroutines []*Goroutine |
| 99 | |
| 100 | // LocalGOROOT is copied from Opts. |
| 101 | LocalGOROOT string |
| 102 | // LocalGOPATHs is copied from Opts. |
| 103 | LocalGOPATHs []string |
| 104 | |
| 105 | // The following members are initialized when Opts.GuessPaths is true. |
| 106 | |
| 107 | // RemoteGOROOT is the GOROOT as detected in the traceback, not the on the |
| 108 | // host. |
| 109 | // |
| 110 | // It can be empty if no root was determined, for example the traceback |
| 111 | // contains only non-stdlib source references. |
| 112 | RemoteGOROOT string |
| 113 | // RemoteGOPATHs is the GOPATH as detected in the traceback, with the value |
| 114 | // being the corresponding path mapped to the host if found. |
| 115 | // |
| 116 | // It can be empty if only stdlib code is in the traceback or if no local |
| 117 | // sources were matched up. In the general case there is only one entry in |
| 118 | // the map. |
| 119 | RemoteGOPATHs map[string]string |
| 120 | |
| 121 | // LocalGomods are the root directories containing go.mod or that directly |
| 122 | // contained source code as detected in the traceback, with the value being |
| 123 | // the corresponding import path found in the go.mod file. |
| 124 | // |
| 125 | // Uses "/" as path separator. No trailing "/". |
| 126 | // |
| 127 | // Because of the "replace" statement in go.mod, there can be multiple root |
| 128 | // directories. A file run by "go run" is also considered a go module to (a |
| 129 | // certain extent). |
| 130 | // |
| 131 | // It is initialized by findRoots(). |
| 132 | // |
| 133 | // Unlike GOROOT and GOPATH, it only works with stack traces created in the |
| 134 | // local file system, hence "Local" prefix. |
| 135 | LocalGomods map[string]string |
| 136 | |
| 137 | // Disallow initialization with unnamed parameters. |
| 138 | _ struct{} |
| 139 | } |
| 140 | |
| 141 | // ScanSnapshot scans the Reader for the output from runtime.Stack() in br. |
| 142 | // |
nothing calls this directly
no outgoing calls
no test coverage detected