MCPcopy Create free account
hub / github.com/Code-Hex/pget / usage

Method usage

option.go:36–53  ·  view source on GitHub ↗
(version string)

Source from the content-addressed store, hash-verified

34}
35
36func (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
55func (opts Options) isupdate(version string) ([]byte, error) {
56 buf := bytes.Buffer{}

Callers 2

parseOptionsMethod · 0.95
parseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected