mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
doc: use '?' in optional functions (#8583)
This commit is contained in:
parent
a94228bb16
commit
22e23eda5d
14
doc/docs.md
14
doc/docs.md
@ -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
|
||||
// once it's made executable using `chmod +x`.
|
||||
|
||||
rm('build/*')
|
||||
rm('build/*')?
|
||||
// Same as:
|
||||
for file in ls('build/') {
|
||||
rm(file)
|
||||
files_build := ls('build/')?
|
||||
for file in files_build {
|
||||
rm(file)?
|
||||
}
|
||||
|
||||
mv('*.v', 'build/')
|
||||
mv('*.v', 'build/')?
|
||||
// Same as:
|
||||
for file in ls('.') {
|
||||
files := ls('.')?
|
||||
for file in files {
|
||||
if file.ends_with('.v') {
|
||||
mv(file, 'build/')
|
||||
mv(file, 'build/')?
|
||||
}
|
||||
}
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user