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: doc/docs.md
+11-12Lines changed: 11 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1312,7 +1312,7 @@ if mut x is MyStruct {
1312
1312
// same with match
1313
1313
match mut x {
1314
1314
MyStruct {
1315
-
// x is casted to MyStruct even it's mutable
1315
+
// x is casted to MyStruct even if it's mutable
1316
1316
// without the mut keyword that wouldn't work
1317
1317
println(x)
1318
1318
}
@@ -2552,8 +2552,7 @@ Installed modules:
2552
2552
ui
2553
2553
```
2554
2554
2555
-
To see all the modules you have installed, you can use:
2556
-
outdated Show installed modules that need updates.
2555
+
To see all the modules that need updates:
2557
2556
```powershell
2558
2557
v outdated
2559
2558
```
@@ -2623,7 +2622,7 @@ Modules are up to date.
2623
2622
the module name you provided e.g. `mygithubname.mymodule`.
2624
2623
2625
2624
**Optional:** tag your V module with `vlang` and `vlang-module` on github.com
2626
-
to allow a better search experiance.
2625
+
to allow for a better search experience.
2627
2626
2628
2627
## Type Declarations
2629
2628
@@ -3536,7 +3535,7 @@ fn main() {
3536
3535
go fn (the_channel chan f64) {
3537
3536
_ := <-the_channel
3538
3537
}(ch3)
3539
-
//
3538
+
3540
3539
select {
3541
3540
a := <-ch {
3542
3541
// do something with `a`
@@ -3619,7 +3618,7 @@ using `rlock` for read-only and `lock` for read/write access.
3619
3618
```v
3620
3619
struct St {
3621
3620
mut:
3622
-
x int // data to shared
3621
+
x int // data to be shared
3623
3622
}
3624
3623
3625
3624
fn (shared b St) g() {
@@ -3776,7 +3775,7 @@ option to see more details about the individual tests run.
3776
3775
3777
3776
You can put additional test data, including .v source files in a folder, named
3778
3777
`testdata`, right next to your _test.v files. V's test framework will *ignore*
3779
-
such folders, while scanning for tests to run. This is usefull, if you want to
3778
+
such folders, while scanning for tests to run. This is useful, if you want to
3780
3779
put .v files with invalid V source code, or other tests, including known
3781
3780
failing ones, that should be run in a specific way/options by a parent _test.v
3782
3781
file.
@@ -4230,7 +4229,7 @@ Comments spanning multiple lines are merged together using spaces, unless
4230
4229
4231
4230
- the line is empty
4232
4231
- the line ends with a `.` (end of sentence)
4233
-
- the line is contains purely of at least 3 of `-`, `=`, `_`, `*`, `~` (horizontal rule)
4232
+
- the line is purely of at least 3 of `-`, `=`, `_`, `*`, `~` (horizontal rule)
4234
4233
- the line starts with at least one `#` followed by a space (header)
4235
4234
- the line starts and ends with a `|` (table)
4236
4235
- the line starts with `- ` (list)
@@ -4675,7 +4674,7 @@ If no flags are passed it will add `--cflags` and `--libs`, both lines below do
4675
4674
The `.pc` files are looked up into a hardcoded list of default pkg-config paths, the user can add
4676
4675
extra paths by using the `PKG_CONFIG_PATH` environment variable. Multiple modules can be passed.
4677
4676
4678
-
To check the existance of a pkg-config use `$pkgconfig('pkg')` as a compile time if condition to
4677
+
To check the existance of a pkg-config use `$pkgconfig('pkg')` as a compile time "if" condition to
4679
4678
check if a pkg-config exists. If it exists the branch will be created. Use `$else` or `$else $if`
4680
4679
to handle other cases.
4681
4680
@@ -4852,7 +4851,7 @@ use `v help`, `v help build` and `v help build-c`.
4852
4851
1. compile your binary with debugging info `v -g hello.v`
4853
4852
2. debug with [lldb](https://lldb.llvm.org) or [GDB](https://www.gnu.org/software/gdb/) e.g. `lldb hello`
4854
4853
4855
-
Troubleshooting (debugging) executables [created with V in GDB](https://github.com/vlang/v/wiki/Troubleshooting-(debugging)-executables-created-with-V-in-GDB)
4854
+
[Troubleshooting (debugging) executables created with V in GDB](https://github.com/vlang/v/wiki/Troubleshooting-(debugging)-executables-created-with-V-in-GDB)
0 commit comments