A FlagSet creates and parses command-line flags. It is similar to the standard flag.FlagSet.
| 86 | // A FlagSet creates and parses command-line flags. |
| 87 | // It is similar to the standard flag.FlagSet. |
| 88 | type FlagSet interface { |
| 89 | // Bool, Int, Float64, and String define new flags, |
| 90 | // like the functions of the same name in package flag. |
| 91 | Bool(name string, def bool, usage string) *bool |
| 92 | Int(name string, def int, usage string) *int |
| 93 | Float64(name string, def float64, usage string) *float64 |
| 94 | String(name string, def string, usage string) *string |
| 95 | |
| 96 | // StringList is similar to String but allows multiple values for a |
| 97 | // single flag |
| 98 | StringList(name string, def string, usage string) *[]*string |
| 99 | |
| 100 | // ExtraUsage returns any additional text that should be printed after the |
| 101 | // standard usage message. The extra usage message returned includes all text |
| 102 | // added with AddExtraUsage(). |
| 103 | // The typical use of ExtraUsage is to show any custom flags defined by the |
| 104 | // specific pprof plugins being used. |
| 105 | ExtraUsage() string |
| 106 | |
| 107 | // AddExtraUsage appends additional text to the end of the extra usage message. |
| 108 | AddExtraUsage(eu string) |
| 109 | |
| 110 | // Parse initializes the flags with their values for this run |
| 111 | // and returns the non-flag command line arguments. |
| 112 | // If an unknown flag is encountered or there are no arguments, |
| 113 | // Parse should call usage and return nil. |
| 114 | Parse(usage func()) []string |
| 115 | } |
| 116 | |
| 117 | // A Fetcher reads and returns the profile named by src, using |
| 118 | // the specified duration and timeout. It returns the fetched |
no outgoing calls
no test coverage detected
searching dependent graphs…