mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tools: format most examples and tutorials, add them to v test-cleancode
(#9826)
This commit is contained in:
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) }
|
||||
|
Reference in New Issue
Block a user