Opts represents options to process the snapshot.
| 27 | |
| 28 | // Opts represents options to process the snapshot. |
| 29 | type Opts struct { |
| 30 | // LocalGOROOT is GOROOT with "/" as path separator. No trailing "/". Can be |
| 31 | // unset. |
| 32 | LocalGOROOT string |
| 33 | // LocalGOPATHs is GOPATH with "/" as path separator. No trailing "/". Can be |
| 34 | // unset. |
| 35 | LocalGOPATHs []string |
| 36 | |
| 37 | // NameArguments tells panicparse to find the recurring pointer values and |
| 38 | // give them pseudo 'names'. |
| 39 | // |
| 40 | // Since the algorithm is O(n²), this can be worth disabling on live servers. |
| 41 | NameArguments bool |
| 42 | |
| 43 | // GuessPaths tells panicparse to guess local RemoteGOROOT and GOPATH for |
| 44 | // what was found in the snapshot. |
| 45 | // |
| 46 | // Initializes in Snapshot the following members: RemoteGOROOT, |
| 47 | // RemoteGOPATHs, LocalGomoduleRoot and GomodImportPath. |
| 48 | // |
| 49 | // This is done by scanning the local disk, so be warned of performance |
| 50 | // impact. |
| 51 | GuessPaths bool |
| 52 | |
| 53 | // AnalyzeSources tells panicparse to processes source files to improve calls |
| 54 | // to be more descriptive. |
| 55 | // |
| 56 | // Requires GuessPaths to be true. |
| 57 | AnalyzeSources bool |
| 58 | |
| 59 | // Disallow initialization with unnamed parameters. |
| 60 | _ struct{} |
| 61 | } |
| 62 | |
| 63 | // DefaultOpts returns default options to process the snapshot. |
| 64 | func DefaultOpts() *Opts { |
nothing calls this directly
no outgoing calls
no test coverage detected