You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/tools/vdownload.v
+10-5Lines changed: 10 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -5,12 +5,14 @@ import flag
5
5
importnet.http
6
6
importcrypto.sha1
7
7
importcrypto.sha256
8
+
importcrypto.sha3
8
9
9
10
structContext {
10
11
mut:
11
12
show_help bool
12
13
show_sha1bool
13
14
show_sha256bool
15
+
show_sha3_256bool
14
16
target_folder string
15
17
output string
16
18
continue_on_failure bool
@@ -38,9 +40,10 @@ fn main() {
38
40
ctx.output= fp.string('output', `o`, '', 'Write output to the given file, instead of inferring it from the final part of the URL. All intermediate folders will be created, if they do not exist.')
39
41
ctx.show_sha1= fp.bool('sha1', `1`, false, 'Show the SHA1 hash of the downloaded file.')
40
42
ctx.show_sha256= fp.bool('sha256', `2`, false, 'Show the SHA256 hash of the downloaded file.')
43
+
ctx.show_sha3_256= fp.bool('sha3-256', `3`, false, 'Show the SHA3-256 (Keccak) hash of the downloaded file.')
41
44
ctx.continue_on_failure= fp.bool('continue', `c`, false, 'Continue on download failures. If you download 5 URLs, and several of them fail, continue without error. False by default.')
42
-
ctx.retries= fp.int('retries', `r`, 10, 'Number of retries, when an URL fails to download.')
43
-
ctx.delay= time.Duration(u64(fp.float('delay', `d`, 1.0, 'Delay in seconds, after each retry.') * time.second))
45
+
ctx.retries= fp.int('retries', `r`, 10, 'Number of retries, when an URL fails to download. The default is 10.')
46
+
ctx.delay= time.Duration(u64(fp.float('delay', `d`, 1.0, 'Delay in seconds, after each retry. The default is 1 second.') * time.second))
44
47
ctx.should_run= fp.bool('run', `R`, false, 'Run, after the script/program is completely downloaded.')
45
48
ctx.delete_after_run= fp.bool('delete-after-run', `D`, false, 'Delete the downloaded script/program, after it has been run.')
Copy file name to clipboardExpand all lines: vlib/v/help/other/download.txt
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,9 @@ Options:
13
13
-o, --output <string> Write output to the given file, instead of inferring it from the final part of the URL. All intermediate folders will be created, if they do not exist.
14
14
-1, --sha1 Show the SHA1 hash of the downloaded file.
15
15
-2, --sha256 Show the SHA256 hash of the downloaded file.
16
+
-3, --sha3-256 Show the SHA3-256 (Keccak) hash of the downloaded file.
16
17
-c, --continue Continue on download failures. If you download 5 URLs, and several of them fail, continue without error. False by default.
17
-
-r, --retries <int> Number of retries, when an URL fails to download.
18
-
-d, --delay <float> Delay in seconds, after each retry.
18
+
-r, --retries <int> Number of retries, when an URL fails to download. The default is 10.
19
+
-d, --delay <float> Delay in seconds, after each retry. The default is 1 second.
19
20
-R, --run Run, after the script/program is completely downloaded.
20
21
-D, --delete-after-run Delete the downloaded script/program, after it has been run.
0 commit comments