(version string)
| 34 | } |
| 35 | |
| 36 | func (opts Options) usage(version string) []byte { |
| 37 | buf := bytes.Buffer{} |
| 38 | |
| 39 | msg := "Pget %s, The fastest file download client\n" |
| 40 | fmt.Fprintf(&buf, msg+ |
| 41 | `Usage: pget [options] URL |
| 42 | Options: |
| 43 | -h, --help print usage and exit |
| 44 | -p, --procs <num> the number of connections for a single URL (default 1) |
| 45 | -o, --output <filename> output file to <filename> |
| 46 | -t, --timeout <seconds> timeout of checking request in seconds (default 10s) |
| 47 | -u, --user-agent <agent> identify as <agent> |
| 48 | -r, --referer <referer> identify as <referer> |
| 49 | --check-update check if there is update available |
| 50 | --trace display detail error messages |
| 51 | `, version) |
| 52 | return buf.Bytes() |
| 53 | } |
| 54 | |
| 55 | func (opts Options) isupdate(version string) ([]byte, error) { |
| 56 | buf := bytes.Buffer{} |
no outgoing calls
no test coverage detected