mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
tools: format most examples and tutorials, add them to v test-cleancode
(#9826)
This commit is contained in:
parent
dff50686d6
commit
16e79bc3ca
38 changed files with 471 additions and 433 deletions
5
examples/v_script.vsh
Executable file → Normal file
5
examples/v_script.vsh
Executable file → Normal file
|
@ -1,9 +1,10 @@
|
|||
#!/usr/local/bin/v run
|
||||
|
||||
// The shebang above associates the file to V on Unix-like systems,
|
||||
// so it can be run just by specifying the path to the file
|
||||
// once it's made executable using `chmod +x`.
|
||||
|
||||
for _ in 0..3 {
|
||||
for _ in 0 .. 3 {
|
||||
println('V script')
|
||||
}
|
||||
|
||||
|
@ -16,7 +17,7 @@ files := ls('.') or { panic(err.msg) }
|
|||
println(files)
|
||||
|
||||
println('\nCreating foo.txt')
|
||||
create('foo.txt')?
|
||||
create('foo.txt') ?
|
||||
|
||||
println('\nFiles:')
|
||||
again_ls := ls('.') or { panic(err.msg) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue