doc: use '?' in optional functions (#8583)

pull/8591/head
StunxFS 2021-02-05 11:51:17 -04:00 committed by GitHub
parent a94228bb16
commit 22e23eda5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 6 deletions

View File

@ -3800,17 +3800,19 @@ module global (so that you can use `ls()` instead of `os.ls()`, for example).
// so it can be run just by specifying the path to the file // so it can be run just by specifying the path to the file
// once it's made executable using `chmod +x`. // once it's made executable using `chmod +x`.
rm('build/*') rm('build/*')?
// Same as: // Same as:
for file in ls('build/') { files_build := ls('build/')?
rm(file) for file in files_build {
rm(file)?
} }
mv('*.v', 'build/') mv('*.v', 'build/')?
// Same as: // Same as:
for file in ls('.') { files := ls('.')?
for file in files {
if file.ends_with('.v') { if file.ends_with('.v') {
mv(file, 'build/') mv(file, 'build/')?
} }
} }
``` ```